fix zfast_crt for rotated games

This commit is contained in:
barbudreadmon 2021-08-18 17:11:38 +02:00 committed by GitHub
parent 543422668d
commit b0c288b141
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,10 +95,10 @@ void main()
float YY = Y*Y;
#if defined(FINEMASK)
float whichmask = fract( gl_FragCoord.x*-0.4999);
float whichmask = fract(floor(vTexCoord.x*params.OutputSize.x*-0.4999));
float mask = 1.0 + float(whichmask < 0.5) * -MASK_DARK;
#else
float whichmask = fract(gl_FragCoord.x * -0.3333);
float whichmask = fract(floor(vTexCoord.x*params.OutputSize.x)*-0.3333));
float mask = 1.0 + float(whichmask <= 0.33333) * -MASK_DARK;
#endif
vec3 colour = texture(Source, p).rgb;
@ -111,4 +111,4 @@ void main()
#endif
FragColor.rgb = colour.rgb*mix(scanLineWeight*mask, scanLineWeightB, dot(colour.rgb,vec3(maskFade)));
}
}