- Home /
Question by
ehudcandivore · Jan 20, 2019 at 09:51 PM ·
lightingshading
Changing the emission intensity of a material when using also an emission map
I'd like to change the emission intensity of a material that's also using an emission map. This works in the UI, so if I pick a white color and change the intensity slider all emissive colors on the material increase in intensity:
After intensity is increased in editor:
I'd like to achieve this effect in runtime, but using
SetColor("_EmissionColor", Color.white * value)
seems to remove the emission map from the object and makes all emission be white:
I've also tried DynamicGI.SetEmissive but no matter what I try, it seems like the editor is somehow able to change the intensity of the emission map, but the code overrides it. Any help would be appreciated :)
Comment