How can you update the specular color dynamically?
by Dave Calabrese · in Torque Game Engine Advanced · 10/03/2008 (3:27 pm) · 2 replies
I've got an object in my game where I want to update the specular color on the fly, using ShaderGen. So I do the following in script...
When I do this.... nothing happens. I have to flat out quit the game, change the specular color, save the material file, then reload. That doesn't seem right, since everything else I can change dynamically... so what's different about that?
-Dave Calabrese
Gaslight Studios
myMaterial.specularColor[0] = "1.0 0.0 0.0 1.0"; reinitMaterials();
When I do this.... nothing happens. I have to flat out quit the game, change the specular color, save the material file, then reload. That doesn't seem right, since everything else I can change dynamically... so what's different about that?
-Dave Calabrese
Gaslight Studios
About the author
Recent Threads
#2
10/04/2008 (8:33 am)
Er.. wow, you're right, lol. That's usually proof when it's time for a weekend! ;)
Torque Owner Brian Richardson