     #define NUMCASCADES 1
 #endif
 
+#ifdef VSM_SHADOW
 float linstep(float min, float max, float v)  
 {  
     return clamp((v - min) / (max - min), 0.0, 1.0);  

            #endif

        #elif defined(VSM_SHADOW)
            vec2 samples = texture(sShadowMap, shadowPos.xy).rg;
            return cShadowIntensity.y + cShadowIntensity.x * Chebyshev(samples, shadowPos.z/shadowPos.w);
        #endif
    #else
        #ifndef LQSHADOW
            // Take four samples and average them
            vec2 offsets = cShadowMapInvSize * shadowPos.w;
            vec4 inLight = vec4(


    return max(p, p_max);
}
#endif

float GetShadow(vec4 shadowPos)
{
