diff --git a/data/shaders/crt-composite.effect b/data/shaders/crt-composite.effect index 8b89d4c..36c20de 100644 --- a/data/shaders/crt-composite.effect +++ b/data/shaders/crt-composite.effect @@ -39,7 +39,9 @@ float4 mainImage(VertData v_in) : TARGET // Anti-alias barrel distortion edges float d = min(min(uv.x, 1. - uv.x), min(uv.y, 1. - uv.y)); float w = length(float2(ddx(d), ddy(d))); - float aa_mask = smoothstep(-0.7, 0.7, (abs(frac(d - 0.25) - 0.5) - 0.25) / w); + // The check for d < 0.49 below likely can be fixed to something + // that doesn't branch. + float aa_mask = d < 0.49 ? smoothstep(-0.7, 0.7, (abs(frac(d - 0.25) - 0.5) - 0.25) / w) : 1.0; float4 color = image.Sample(textureSampler, uv); float4 blur_color = blur_image.Sample(textureSampler, uv);