fix mudlord-pal-vhs

some errors crept in from the de-obfuscation
This commit is contained in:
hizzlekizzle 2024-09-16 17:39:25 -05:00 committed by GitHub
parent 49c77cab02
commit 630fe655fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,10 +57,20 @@ float rand(float x)
return fract(sin(sn) * c);
}
vec2 crt(vec2 s,float e)
{
vec2 tempvar = (s - 0.5) * 2.;
tempvar *= 0.5;
tempvar.x *= 1.+pow(abs(tempvar.y)/e,2.);
tempvar.y *= 1.+pow(abs(tempvar.x)/e,2.);
tempvar = tempvar + .5, tempvar;
return tempvar;
}
void main()
{
vec4 col = vec4(0.0);
vec2 q = vTexCoord.xy * TextureSize.xy / InputSize.xy;
vec2 q = vTexCoord.xy;
vec2 uv = q;
vec2 uv_q = uv;
@ -101,8 +111,6 @@ else
col.rgb = texture(Source,uv_n).rgb;
}
if(params.phosphors==1.0)
{
float mod_factor = uv.y * params.OutputSize.y * params.OutputSize.y / params.OutputSize.y;
@ -110,7 +118,6 @@ if(params.phosphors==1.0)
col.rgb*= dotMaskWeights;
}
if(params.border ==1.0)
{
vec2 p=-1.0+2.0*crt(uv, 2.0);
@ -118,7 +125,5 @@ if(params.border ==1.0)
float frame = clamp(params.frameSharpness * (pow(f, params.frameShape) - params.frameLimit), 0.0, 1.0);
col.rgb*=frame;
}
FragColor = vec4(col.rgb, 1.0);
}