Skip to content

Commit eb92fc1

Browse files
fix the premultiply
1 parent 600305c commit eb92fc1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/shockwave/shockwave.wgsl

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ fn mainFragment(
7171
clampedColor *= max(0.0, 1.0 - length(coord - clampedCoord));
7272
}
7373
// No clamp :
74-
return select(clampedColor * vec4<f32>(vec3<f32>(1.0 + (uBrightness - 1.0) * p * fade), clampedColor.a), textureSample(uTexture, uSampler, uv), returnColorOnly);
74+
var finalColor = clampedColor;
75+
76+
return select(finalColor, textureSample(uTexture, uSampler, uv), returnColorOnly);
7577
}
7678

7779
fn boolVec2(x: vec2<f32>, y: vec2<f32>) -> bool

0 commit comments

Comments
 (0)