16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-09-02 02:39:19 +02:00

fix null reference

This commit is contained in:
VB
2017-07-02 15:42:43 +02:00
parent d9d1456792
commit 2b51d8229e
3 changed files with 3 additions and 8 deletions

View File

@@ -45,7 +45,7 @@ float calc_shadow()
coords = coords * 0.5 + 0.5;
float closest_depth = texture(shadowmap, coords.xy).r;
float current_depth = coords.z;
float shadow = current_depth > closest_depth ? 0.0 : 1.0;
float shadow = (current_depth - 0.1) > closest_depth ? 0.0 : 1.0;
return shadow;
}