Jump to content
Sign in to follow this  
  • entries
    149
  • comments
    510
  • views
    95072

Optimizations

Sign in to follow this  
noaktree

119 views

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.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!