Skip to content

Commit

Permalink
Fix: Premultiply for the ShockwaveFilter (#444)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodBoyDigital authored Mar 7, 2024
1 parent 1a956f5 commit 932a5b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/shockwave/shockwave.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ fn mainFragment(
clampedColor *= max(0.0, 1.0 - length(coord - clampedCoord));
}
// No clamp :
return select(clampedColor * vec4<f32>(vec3<f32>(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<f32>, y: vec2<f32>) -> bool
Expand Down

0 comments on commit 932a5b9

Please sign in to comment.