- Home /
Is it possible to disable beast lightmap at runtime?
Is it possible to disable beast lightmap at runtime?
I have a trouble, when I changed game time to night time, terrain is still bright.
Answer by taoa · Mar 02, 2011 at 09:29 AM
Once an object is lightmapped, it's flagged as such internally and therefore it'll always use the lightmap's data to get light information at rendering time.
However if you look at compiled surface shaders (Add
#pragma debug
in the pragma declarations of your surface shader to be able to read the generated shader passes in plain readable code) you will see where specific calls to getting lightmap info are made. This mean that you could potentially deconstruct a surface shader (copy/paste the generated bits of code) and reconstruct it with adding a control on how lightmap data is used, through a 0-1 float or something, which will use lightmapping data when the float is at 0 and 'classic' lighting code when at 1.
So, with a great deal of patience and some serious shader knowledge, yeah, it's possible. Otherwise, no, you cannot do this.
Your answer
![](https://koobas.hobune.stream/wayback/20220613110925im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
indirect lighting is not visible on dynamic objects 1 Answer
Lightmap Problem: near lightmap much too dark 2 Answers
Beast Lightmapping Issue. 1 Answer
bug in beast lightmap 2 Answers
Lightmapping - Shadow power 1 Answer