     #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);  

                texture2DProj(sShadowMap, vec4(shadowPos.xy + offsets.xy, shadowPos.zw)).r * shadowPos.w > shadowPos.z
            );
            return cShadowIntensity.y + dot(inLight, vec4(cShadowIntensity.x));
        #else
            // Take one sample
            return cShadowIntensity.y + (texture2DProj(sShadowMap, shadowPos).r * shadowPos.w > shadowPos.z ? cShadowIntensity.x : 0.0);
        #endif
    #endif
}

float ReduceLightBleeding(float p_max, float Amount)  
{  
    // Remove the [0, Amount] tail and linearly rescale (Amount, 1].  
    return linstep(Amount, 1.0, p_max); 
}  

float Chebyshev(vec2 Moments, float depth)  
{  
