]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - client/shaders/object_shader/opengl_vertex.glsl
Improve shadow filters (#12195)
[dragonfireclient.git] / client / shaders / object_shader / opengl_vertex.glsl
index 6dc25f85481ef86e93e237741ffb88f3858ef2dd..dc9c70cdfd9ef2a8a047f9c0f8c9737af9624009 100644 (file)
@@ -30,6 +30,7 @@ centroid varying vec2 varTexCoord;
        varying float adj_shadow_strength;
        varying float f_normal_length;
        varying vec3 shadow_position;
+       varying float perspective_factor;
 #endif
 
 varying vec3 eyeVec;
@@ -162,6 +163,7 @@ void main(void)
 
                shadow_position = applyPerspectiveDistortion(m_ShadowViewProj * mWorld * (inVertexPosition + vec4(normalOffsetScale * nNormal, 0.0))).xyz;
                shadow_position.z -= z_bias;
+               perspective_factor = pFactor;
 
                if (f_timeofday < 0.2) {
                        adj_shadow_strength = f_shadow_strength * 0.5 *