Jump to content
  • Advertisement
Sign in to follow this  
BroderickCalpe

Shaders question

This topic is 1937 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!