Jump to content
  • Advertisement
Sign in to follow this  
bimm

changing uniforms expensive?

This topic is 2429 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

I have around 4000 buffers that need to be drawn, and I change my shader uniform 'translation' value before each drawing. Should I just store the entire translation+position in the vertex position instead to avoid changing that uniform rapidly? (it would require a larger position datatype to hold the range)

Share this post


Link to post
Share on other sites
Advertisement
If storing the transform in the vertex data is an option then why not simply store the transformed vertices to begin with?

Share this post


Link to post
Share on other sites
You can store the positions in a GL_RGBA32F texture.
Send a texcoord value (1 dimentionsal) to read the GL_RGBA32F texture from your vertex shader.

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.

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!