🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Optimizations

posted in noaktree leaves
Published January 29, 2005
Advertisement
I optimized two functions in the core graphics class. These functions get either the nearest active light (NAL1) or the second nearest active light (NAL2) in relation to a vector parameter. The optimized part is that now each function stores the previous nearest light found and the previous vector parameter. Now each time one of the two functions are called they check to see if the vector parameter is the same as the previously stored vector and also if the lighting state has not changed. If both are true then the function skips all redundant calculations are returns the previously calculated nearest active light (NAL). This adjustment should make rendering position-static objects, which use material shaders that depend on engine lighting information, more efficient.

Next up: Modifying the SEND functions of the FX Shader class to allow dynamic naming of handles for engine specific data. This is necessary as it allows the shader author to name shader parameters anything ( and make multiple instances of objects) rather than needing to follow a strict set of parameter naming rules for engine specific data. Should be fun and it is a necessary step to implementing the new parameter semantics and annotation naming conventions mentioned on the 28th.
Previous Entry Morning Coffee
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement