• Advertisement
Sign in to follow this  

changing uniforms expensive?

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