1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-26 18:21:04 +00:00

Improve lighting of entities.

Pass correct natural & artificial light to the shaders
Use natural/artificial light ratio for correct rendering of shadows
This commit is contained in:
Dmitry Kostenko 2021-11-04 03:03:10 +01:00 committed by x2048
parent f2cccf8da7
commit 54dccc480e
5 changed files with 50 additions and 25 deletions

View file

@ -471,7 +471,7 @@ void main(void)
color = base.rgb;
vec4 col = vec4(color.rgb, base.a);
col.rgb *= varColor.rgb;
col.rgb *= emissiveColor.rgb * vIDiff;
col.rgb *= vIDiff;
#ifdef ENABLE_DYNAMIC_SHADOWS
float shadow_int = 0.0;