I was able to utilize a uniform to tell the shader to change it's behavior. I ended up finding a solution to procedurally switching the shader by using the follownig:
Code:
//materialRes: texture resource attached to the selected node (cube)
//specularShaderRes: resource handle to shader added with h3dAddResource
h3dSetResParamI(materialRes, MaterialElem, 0, MatShaderI, specularShaderRes);
I guess the thing I can't get my head is around is how to dynamically shade an unknown number of cubes. My project can have anywhere from 1 to about 2000+ cubes render at a time. The user can select a subset of cubes which will glow after being selected. As cubes timeout I would like them to gradually fade out by adjusting their alpha over a timeout. I know I can use a uniform to communicate timing information for the fading to a shader. I'm just not sure how to do this dynamically for each cube. Are there any resources that cover similar situations?
Thanks again for your help!