Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Shaders question

4: Adsense

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   

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



#2 BitMaster   Members   

8647
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.