But the worse part is that I was doing it badly. The surface normal was just a cross-product of the polygon's sides. The surface normals stored in the polygon struct itself are averaged vertex normals, which make for smoother lighting. And they're sitting right there.
So long story short I took a little time out and made the code interpolate the vertex normals instead. Here's what the changed normals look like with grass debugging shaders:
(Before)
(After)
And in some non-debug shots:
(Before)
(After)
The grass itself has changed too, so it's hard to see the difference in the foreground. But the slope in the background really shows improvement.
No comments:
Post a Comment