diff --git a/WickedEngine/shaders/volumetricLight_SpotPS.hlsl b/WickedEngine/shaders/volumetricLight_SpotPS.hlsl index 6603ad1e5..eb4ff9ce0 100644 --- a/WickedEngine/shaders/volumetricLight_SpotPS.hlsl +++ b/WickedEngine/shaders/volumetricLight_SpotPS.hlsl @@ -116,7 +116,7 @@ float4 main(VertexToPixel input) : SV_TARGET shadow_pos.xyz /= shadow_pos.w; float2 shadow_uv = shadow_pos.xy * float2(0.5f, -0.5f) + float2(0.5f, 0.5f); [branch] - if ((saturate(shadow_uv.x) == shadow_uv.x) && (saturate(shadow_uv.y) == shadow_uv.y)) + if (is_saturated(shadow_uv)) { attenuation *= shadow_2D(light, shadow_pos.z, shadow_uv.xy, 0, input.pos.xy); } diff --git a/WickedEngine/shaders/volumetriclight_rectanglePS.hlsl b/WickedEngine/shaders/volumetriclight_rectanglePS.hlsl index fe58e62b7..7179b7975 100644 --- a/WickedEngine/shaders/volumetriclight_rectanglePS.hlsl +++ b/WickedEngine/shaders/volumetriclight_rectanglePS.hlsl @@ -102,7 +102,7 @@ float4 main(VertexToPixel input) : SV_TARGET shadow_pos.xyz /= shadow_pos.w; float2 shadow_uv = clipspace_to_uv(shadow_pos.xy); [branch] - if (is_saturated(shadow_uv.x)) + if (is_saturated(shadow_uv)) { attenuation *= shadow_2D(light, shadow_pos.z, shadow_uv.xy, 0, input.pos.xy); }