Merge pull request #488 from metallic77/slang

reduce moire to minimum
This commit is contained in:
hizzlekizzle 2023-09-25 15:55:56 -05:00 committed by GitHub
commit 43ad7ab791
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,9 +24,9 @@ layout(push_constant) uniform Push
// Parameter lines go here: // Parameter lines go here:
#pragma parameter CURV "CRT-Geom Curvature" 1.0 0.0 1.0 1.0 #pragma parameter CURV "CRT-Geom Curvature" 1.0 0.0 1.0 1.0
#pragma parameter SCAN "CRT-Geom Scanline Weight" 0.2 0.2 0.6 0.05 #pragma parameter SCAN "CRT-Geom Scanline Weight" 0.25 0.2 0.6 0.05
#pragma parameter MASK "CRT-Geom Dotmask Strength" 0.2 0.0 1.0 0.05 #pragma parameter MASK "CRT-Geom Dotmask Strength" 0.25 0.0 1.0 0.05
#pragma parameter LUM "CRT-Geom Luminance" 0.05 0.0 0.5 0.01 #pragma parameter LUM "CRT-Geom Luminance" 0.1 0.0 0.5 0.01
#pragma parameter INTERL "CRT-Geom Interlacing Simulation" 1.0 0.0 1.0 1.0 #pragma parameter INTERL "CRT-Geom Interlacing Simulation" 1.0 0.0 1.0 1.0
#pragma parameter SAT "CRT-Geom Saturation" 1.1 0.0 2.0 0.01 #pragma parameter SAT "CRT-Geom Saturation" 1.1 0.0 2.0 0.01
#pragma parameter LANC "Filter profile: Accurate/Fast" 0.0 0.0 1.0 1.0 #pragma parameter LANC "Filter profile: Accurate/Fast" 0.0 0.0 1.0 1.0
@ -159,7 +159,6 @@ void main()
res *= sqrt(scn*msk); res *= sqrt(scn*msk);
float l = dot(vec3(0.29, 0.6, 0.11), res); float l = dot(vec3(0.29, 0.6, 0.11), res);
res *= mix(1.0, 1.2, l);
res = mix(vec3(l), res, SAT); res = mix(vec3(l), res, SAT);
if (corn.y <= corn.x && CURV == 1.0 || corn.x < 0.0001 && CURV == 1.0 ) res = vec3(0.0); if (corn.y <= corn.x && CURV == 1.0 || corn.x < 0.0001 && CURV == 1.0 ) res = vec3(0.0);