GeorgeP Posted May 1, 2012 Share Posted May 1, 2012 Hello. Lets say i have open the material window. I notice that when i change the hour of the day from environment, the material's color is changed too. I want to create my personal editor where the material color (in editor) is constant and when i aply it to any object in the world, it changes color normally according to environment's illumination. I am using WidgetSpriteMaterial. So my question is if i can disable the light features of this material when shown in material editor. Thank you for your time. Link to comment
manguste Posted May 8, 2012 Share Posted May 8, 2012 The material drawn in the sprite viewport window is lit in the ambient pass just like in-world surfaces. However, there's a trick you can use. GUI with all widgets is drawn at the very end of a rendering frame. For that" Disable environment lighting (set Ambient Environment scale to 0) for the material in flush() so that the widget in material is rendered only with ambient color. Reenable it again in update() so that surfaces in the world are rendered properly. Link to comment
Recommended Posts