Skip to content

Commit

Permalink
fix(DoF): mask function (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
davcri authored Feb 2, 2024
1 parent dc609fc commit 7f6e394
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/effects/DepthOfField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export const DepthOfField = forwardRef(function DepthOfField(
// Depth texture for depth picking with optional packing strategy
if (depthTexture) effect.setDepthTexture(depthTexture.texture, depthTexture.packing as DepthPackingStrategies)
// Temporary fix that restores DOF 6.21.3 behavior, everything since then lets shapes leak through the blur
const maskMaterial = (effect as any).maskPass.getFullscreenMaterial()
maskMaterial.maskFunction = MaskFunction.MULTIPLY_RGB_SET_ALPHA
const maskPass = (effect as any).maskPass
maskPass.maskFunction = MaskFunction.MULTIPLY_RGB_SET_ALPHA
return effect
}, [
camera,
Expand Down

0 comments on commit 7f6e394

Please sign in to comment.