             #endif
 
         #elif defined(VSM_SHADOW)
-            vec2 samples = texture(sShadowMap, shadowPos.xy).rg;
+            vec2 samples = texture2D(sShadowMap, shadowPos.xy).rg;
             return cShadowIntensity.y + cShadowIntensity.x * Chebyshev(samples, shadowPos.z/shadowPos.w);
         #endif
     #else
-        #ifndef LQSHADOW
+        #if defined(SIMPLE_SHADOW)
+            // Take one sample
+            return cShadowIntensity.y + (texture2DProj(sShadowMap, shadowPos).r * shadowPos.w > shadowPos.z ? cShadowIntensity.x : 0.0);
+        
+        #elif defined(PCF_SHADOW)
             // Take four samples and average them
             vec2 offsets = cShadowMapInvSize * shadowPos.w;
             vec4 inLight = vec4(

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


float Chebyshev(vec2 Moments, float depth)  
{  


    return max(p, p_max);
}
#endif

float GetShadow(vec4 shadowPos)
{
