Shaders question

Started by
0 comments, last by BitMaster 11 years ago

I have 32 spheres all using the same Shaders.

I select one of the spheres and would like to change the color of that particular sphere now. How can I do this the way I have setup my project?

Is the procedure to load another shader at runtime for a particular shader or how are the shaders used?

Thanks

Advertisement
In the simplest case you would probably just change the uniform which controls the color the spheres have.

In such a trivial case setting a different shader which behaves as desired would work too but such an approach does not scale well to more interesting scenarios. Uniforms are there for these reasons. Learn to use them.

This topic is closed to new replies.

Advertisement