Jump to content

  • Log In with Google      Sign In   
  • Create Account


Shaders question


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Hachaso77   Members   -  Reputation: 231

Like
0Likes
Like

Posted 02 April 2013 - 07:57 AM

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



Sponsor:

#2 BitMaster   Crossbones+   -  Reputation: 3657

Like
0Likes
Like

Posted 02 April 2013 - 08:46 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS