From eb92fc1551a3dd270152accaf40078c7e40898bf Mon Sep 17 00:00:00 2001 From: Mat Groves Date: Mon, 19 Feb 2024 19:46:38 +0000 Subject: [PATCH] fix the premultiply --- src/shockwave/shockwave.wgsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shockwave/shockwave.wgsl b/src/shockwave/shockwave.wgsl index e15035889..4d64cf8a3 100644 --- a/src/shockwave/shockwave.wgsl +++ b/src/shockwave/shockwave.wgsl @@ -71,7 +71,9 @@ fn mainFragment( clampedColor *= max(0.0, 1.0 - length(coord - clampedCoord)); } // No clamp : - return select(clampedColor * vec4(vec3(1.0 + (uBrightness - 1.0) * p * fade), clampedColor.a), textureSample(uTexture, uSampler, uv), returnColorOnly); + var finalColor = clampedColor; + + return select(finalColor, textureSample(uTexture, uSampler, uv), returnColorOnly); } fn boolVec2(x: vec2, y: vec2) -> bool