Jump to content
  • Advertisement
Sign in to follow this  

Are shader constants initialized to any value?

This topic is 2258 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In order to save CPU I thought I could skip sending to shader constants which are zeroes. So if my shader uses values like "materialDiffuse" and "materialEmission", and some object's material emission is equal to (0, 0, 0), can I skip sending the emission value to the shader and be sure that this shader constant will be initialized to zero?

Share this post


Link to post
Share on other sites
Advertisement
Great, thank you very much.
And what about OpenGL? To be more specific, how does it look like with ARB and GLSL shaders?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!