From 29e6c68d4f51f54b6f628164b7dfb7277518f4e5 Mon Sep 17 00:00:00 2001 From: rz5 Date: Sat, 16 Jul 2016 00:45:50 +0100 Subject: [PATCH] Update crt-easymode.slang Unbreak the translation. There's still too much chromatic aberration going. --- crt/crt-easymode.slang | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/crt/crt-easymode.slang b/crt/crt-easymode.slang index ec57ec5..f1d411f 100644 --- a/crt/crt-easymode.slang +++ b/crt/crt-easymode.slang @@ -12,8 +12,6 @@ layout(std140, set = 0, binding = 0) uniform UBO layout(location = 0) in vec4 Position; layout(location = 1) in vec2 TexCoord; layout(location = 0) out vec2 vTexCoord; -layout(location = 2) out vec2 coords; - void main() { @@ -53,7 +51,6 @@ void main() #pragma stage fragment layout(location = 0) in vec2 vTexCoord; layout(location = 1) in vec2 FragCoord; -layout(location = 2) in vec2 coords; layout(location = 0) out vec4 FragColor; layout(set = 0, binding = 2) uniform sampler2D Source; @@ -128,7 +125,7 @@ void main() { vec2 dx = vec2(1.0 / global.SourceSize.x, 0.0); vec2 dy = vec2(0.0, 1.0 / global.SourceSize.y); - vec2 pix_co = coords * global.SourceSize.xy - vec2(0.5, 0.5); + vec2 pix_co = vTexCoord * global.SourceSize.xy - vec2(0.5, 0.5); vec2 tex_co = (floor(pix_co) + vec2(0.5, 0.5)) / global.SourceSize.xy; vec2 dist = fract(pix_co); float curve_x; @@ -159,10 +156,10 @@ void main() float bright = (max(col.r, max(col.g, col.b)) + luma) / 2.0; float scan_bright = clamp(bright, SCANLINE_BRIGHT_MIN, SCANLINE_BRIGHT_MAX); float scan_beam = clamp(bright * SCANLINE_BEAM_WIDTH_MAX, SCANLINE_BEAM_WIDTH_MIN, SCANLINE_BEAM_WIDTH_MAX); - float scan_weight = 1.0 - pow(cos(coords.y * 2.0 * PI * global.SourceSize.y) * 0.5 + 0.5, scan_beam) * SCANLINE_STRENGTH; + float scan_weight = 1.0 - pow(cos(vTexCoord.y * 2.0 * PI * global.SourceSize.y) * 0.5 + 0.5, scan_beam) * SCANLINE_STRENGTH; float mask = 1.0 - MASK_STRENGTH; - vec2 mod_fac = floor(coords * global.OutputSize.xy * global.SourceSize.xy / (global.SourceSize.xy * vec2(MASK_SIZE, MASK_DOT_HEIGHT * MASK_SIZE))); + vec2 mod_fac = floor(vTexCoord * global.OutputSize.xy * global.SourceSize.xy / (global.SourceSize.xy * vec2(MASK_SIZE, MASK_DOT_HEIGHT * MASK_SIZE))); int dot_no = int(mod((mod_fac.x + mod(mod_fac.y, 2.0) * MASK_STAGGER) / MASK_DOT_WIDTH, 3.0)); vec3 mask_weight;