feat: recompiling shaders

This commit is contained in:
MihailRis
2025-07-02 23:02:50 +03:00
parent 5751802da2
commit 96a94aa33c
5 changed files with 102 additions and 52 deletions
+4 -4
View File
@@ -11,10 +11,7 @@ uniform float u_shadowsOpacity;
uniform float u_shadowsSoftness;
float calc_shadow() {
if (!u_enableShadows) {
return 1.0;
}
#ifdef ENABLE_SHADOWS
float step = 1.0 / float(u_shadowsRes);
float s = pow(abs(cos(u_dayTime * PI2)), 0.25) * u_shadowsOpacity;
vec3 normalOffset = a_realnormal * (a_distance > 64.0 ? 0.2 : 0.04);
@@ -39,6 +36,9 @@ float calc_shadow() {
shadow = 0.5;
}
return 0.5 * (1.0 + s * shadow);
#else
return 1.0;
#endif
}
#endif // SHADOWS_GLSL_