fix entities shading

This commit is contained in:
MihailRis
2025-07-07 19:43:18 +03:00
parent 07d39d2742
commit 7a98f0c411
7 changed files with 58 additions and 41 deletions
+2 -1
View File
@@ -8,7 +8,8 @@ uniform float u_weatherFogDencity;
uniform float u_weatherFogCurve;
float calc_torch_light(vec3 normal, vec3 modelpos) {
return max(0.0, 1.0 - distance(u_cameraPos, modelpos) / u_torchlightDistance) * max(0.0, -dot(normal, normalize(modelpos - u_cameraPos)));
return max(0.0, 1.0 - distance(u_cameraPos, modelpos) / u_torchlightDistance)
* max(0.0, -dot(normal, normalize(modelpos - u_cameraPos)));
}
vec3 calc_screen_normal(vec3 normal) {