From 5d7574566f021ce44657caafec28a79ae43c1230 Mon Sep 17 00:00:00 2001 From: rz5 Date: Thu, 11 Aug 2016 17:04:51 +0100 Subject: [PATCH 1/2] Update crt-easymode-halation.slang Fix compilation and 1 style nit. --- .../shaders/crt-easymode-halation/crt-easymode-halation.slang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nonfunctional/shaders/crt-easymode-halation/crt-easymode-halation.slang b/test/nonfunctional/shaders/crt-easymode-halation/crt-easymode-halation.slang index b45477e..79a381c 100644 --- a/test/nonfunctional/shaders/crt-easymode-halation/crt-easymode-halation.slang +++ b/test/nonfunctional/shaders/crt-easymode-halation/crt-easymode-halation.slang @@ -104,7 +104,7 @@ float get_scanline_weight(float pos, float beam, float strength) { float weight = 1.0 - pow(cos(pos * 2.0 * PI) * 0.5 + 0.5, beam); - return weight * strength * 2.0 + (1.0 - strength);; + return weight * strength * 2.0 + (1.0 - strength); } vec2 curve_coordinate(vec2 co, float curvature) @@ -223,7 +223,7 @@ void main() mask_weight *= mix(1.0, mask_mul, mask_dither); mask_weight = mix(vec3(1.0), mask_weight, clamp(param.MASK_TYPE, 0.0, 1.0)); - vec3 col2 = (col * mask_weight) * param.BRIGHTNESS; + vec3 col2 = (col * mask_weight) * param.BRIGHTNESS; float scan_weight = get_scanline_weight(scan_pos - sample_offset, scan_beam, scan_strength); col = clamp(col2 * scan_weight, 0.0, 1.0); scan_weight = get_scanline_weight(scan_pos, scan_beam, scan_strength); From 1ca0462818fdccb029fbf099c41b1c680bb2b760 Mon Sep 17 00:00:00 2001 From: rz5 Date: Thu, 11 Aug 2016 18:28:34 +0100 Subject: [PATCH 2/2] Update crt-easymode-halation.slang These 2 factors cancel out, I think. --- .../shaders/crt-easymode-halation/crt-easymode-halation.slang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nonfunctional/shaders/crt-easymode-halation/crt-easymode-halation.slang b/test/nonfunctional/shaders/crt-easymode-halation/crt-easymode-halation.slang index 79a381c..c924d74 100644 --- a/test/nonfunctional/shaders/crt-easymode-halation/crt-easymode-halation.slang +++ b/test/nonfunctional/shaders/crt-easymode-halation/crt-easymode-halation.slang @@ -204,8 +204,8 @@ void main() float mask_dither = fract(mask_config.x) * 10.0; vec2 mod_fac = floor( - vTexCoord * global.OutputSize.xy * global.SourceSize.xy / - (global.SourceSize.xy * vec2(param.MASK_SIZE, mask_dot_height * param.MASK_SIZE)) + vTexCoord * global.OutputSize.xy / + (vec2(param.MASK_SIZE, mask_dot_height * param.MASK_SIZE)) ); int dot_no = int(mod((mod_fac.x + mod(mod_fac.y, 2.0) * mask_stagger) / mask_dot_width, mask_colors));