Skip to content

Commit

Permalink
fix the premultiply
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodBoyDigital committed Feb 19, 2024
1 parent 600305c commit eb92fc1
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 eb92fc1

Please sign in to comment.