Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  


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  


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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!