mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
OpenGL2: Add more ambient to lightmapped materials.
This commit is contained in:
parent
8955752457
commit
f7711a8119
1 changed files with 3 additions and 0 deletions
|
@ -274,6 +274,9 @@ void main()
|
|||
ambientColor = lightColor;
|
||||
float surfNL = clamp(dot(var_Normal.xyz, L), 0.0, 1.0);
|
||||
|
||||
// reserve 25% ambient to avoid black areas on normalmaps
|
||||
lightColor *= 0.75;
|
||||
|
||||
// Scale the incoming light to compensate for the baked-in light angle
|
||||
// attenuation.
|
||||
lightColor /= max(surfNL, 0.25);
|
||||
|
|
Loading…
Reference in a new issue