mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-25 08:51:32 +11:00
Merge pull request #341 from nfp0/handheld-border-lcd-shaders-scaling-parameter
Restricted shader processing to the game screen area, fixing blurry cutoff point
This commit is contained in:
commit
1879db0e5d
|
@ -94,6 +94,8 @@ float intsmear(float x, float dx, float d, float coeffs[7])
|
||||||
}
|
}
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
|
{
|
||||||
|
if(abs(vTexCoord.x - 0.5) < 0.5 && abs(vTexCoord.y - 0.5) < 0.5)
|
||||||
{
|
{
|
||||||
vec2 texelSize = global.SourceSize.zw;
|
vec2 texelSize = global.SourceSize.zw;
|
||||||
/* float2 range = IN.video_size / (IN.output_size * IN.texture_size); */
|
/* float2 range = IN.video_size / (IN.output_size * IN.texture_size); */
|
||||||
|
@ -138,3 +140,8 @@ void main()
|
||||||
|
|
||||||
FragColor = vec4(pow(averageColor, vec3(1.0/outgamma)),0.0);
|
FragColor = vec4(pow(averageColor, vec3(1.0/outgamma)),0.0);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FragColor = vec4(0.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -56,6 +56,8 @@ float intsmear(float x, float dx)
|
||||||
}
|
}
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
|
{
|
||||||
|
if(abs(vTexCoord.x - 0.5) < 0.5 && abs(vTexCoord.y - 0.5) < 0.5)
|
||||||
{
|
{
|
||||||
vec2 texelSize = global.SourceSize.zw;
|
vec2 texelSize = global.SourceSize.zw;
|
||||||
vec2 subtexelSize = texelSize / vec2(3.0,1.0);
|
vec2 subtexelSize = texelSize / vec2(3.0,1.0);
|
||||||
|
@ -95,3 +97,8 @@ void main()
|
||||||
|
|
||||||
FragColor = pow(averageColor,vec4(1.0/global.gamma));
|
FragColor = pow(averageColor,vec4(1.0/global.gamma));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FragColor = vec4(0.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue