Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

changing uniforms expensive?

Started by bimm Feb 18, 2012 at 3:22 PM 1 replies 1.4k views
Original Post
bimm
bimm
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)
V-man
V-man
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.