Stupid beginner question

How can I pass a value to the vertex shader each render pass? E.g. Say I just want a float timePassed which I increase before each render.

It seems if I use a uniform I have to recompile (expensive surely?) and if I use an attribute then I need a value for every vertex.

Thanks in advance,

Stuart.

I’d try using a uniform first, as I’ve used uniforms on my 7900 and 8800 with absolutely no recompilation hits (to pass time elapsed as well).

You do not have to recompile if you use a uniform.

When I looked at the spec I only saw “read-only” and “initialized at link time”. So I started looking for other options. Now that I read it again I see “or through the API”.

Tbanks!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.