Sign in to follow this  
bimm

changing uniforms expensive?

Recommended Posts

bimm    102
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
japro    887
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
V-man    813
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

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

Sign in to follow this