[SOLVED] Switching between Phong/Blinn in real-time

Hello,

Is there a way to change the shader program from phong<->blinn on realtime? Using the material.shader property?

If it is possible, how do I get a reference to the internal phong/blinn shaders to assign them?

Thank you in advance,
Leonidas

Ah, found it, had to use the .shadingModel property.

Just a note to say that the phong shading model should really be considered legacy and the intention is that we’ll remove it at some point in the future. Everybody should really be using the physical (blinn) model from now on.