From d05cb3928d0ef7b65fac3ca835067dd44f2c881c Mon Sep 17 00:00:00 2001 From: Rezmason Date: Thu, 11 Nov 2021 21:56:44 -0800 Subject: [PATCH] Discovered an overlooked vertical flip I wasn't performing in the WGSL resurrection shader. --- shaders/wgsl/resurrectionPass.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shaders/wgsl/resurrectionPass.wgsl b/shaders/wgsl/resurrectionPass.wgsl index 74a4de3..00611b1 100644 --- a/shaders/wgsl/resurrectionPass.wgsl +++ b/shaders/wgsl/resurrectionPass.wgsl @@ -79,7 +79,7 @@ fn hslToRgb(h : f32, s : f32, l : f32) -> vec3 { brightness = brightness - randomFloat( uv + vec2(time.seconds) ) * config.ditherMagnitude; // Calculate a hue based on distance from center - var hue = 0.35 + (length(uv - vec2(0.5, 1.0)) * -0.4 + 0.2); + var hue = 0.35 + (length(vec2(uv.x, 1.0 - uv.y) - vec2(0.5, 1.0)) * -0.4 + 0.2); // Convert HSL to RGB var rgb = hslToRgb(hue, 0.8, max(0., brightness.r)) * vec3(0.8, 1.0, 0.7);