Friday, December 3, 2010

Shadows added!

Since I started modifying the terrain shader, I have had no luck getting shadows to work in the engine. Through a combination of wholesale stealing and careful modification, however, I have been able to add shadows to the terrain shader, making it slightly slower and a whole lot prettier. Forests, especially, epitomize both the speed issues and the prettiness bonus.

In other optimizations, I cleaned up a lot of the nonsense code in the terrain shader, removed a couple of if statements, and got rid of a lot of division. It's still not as fast as I'd like, but it's probably about as fast as it can reasonably be. (Translation: Without diving into the assembly code!) Other code needs my optimizing attention more!

No comments:

Post a Comment