mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-22 15:51:30 +11:00
Merge pull request #187 from barbudreadmon/patch-1
fix zfast_crt for rotated games
This commit is contained in:
commit
8f190244fd
|
@ -95,10 +95,10 @@ void main()
|
||||||
float YY = Y*Y;
|
float YY = Y*Y;
|
||||||
|
|
||||||
#if defined(FINEMASK)
|
#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;
|
float mask = 1.0 + float(whichmask < 0.5) * -MASK_DARK;
|
||||||
#else
|
#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;
|
float mask = 1.0 + float(whichmask <= 0.33333) * -MASK_DARK;
|
||||||
#endif
|
#endif
|
||||||
vec3 colour = texture(Source, p).rgb;
|
vec3 colour = texture(Source, p).rgb;
|
||||||
|
@ -111,4 +111,4 @@ void main()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FragColor.rgb = colour.rgb*mix(scanLineWeight*mask, scanLineWeightB, dot(colour.rgb,vec3(maskFade)));
|
FragColor.rgb = colour.rgb*mix(scanLineWeight*mask, scanLineWeightB, dot(colour.rgb,vec3(maskFade)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue