Skip to content

Commit 7f6e394

Browse files
authored
fix(DoF): mask function (#262)
1 parent dc609fc commit 7f6e394

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/effects/DepthOfField.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ export const DepthOfField = forwardRef(function DepthOfField(
5858
// Depth texture for depth picking with optional packing strategy
5959
if (depthTexture) effect.setDepthTexture(depthTexture.texture, depthTexture.packing as DepthPackingStrategies)
6060
// Temporary fix that restores DOF 6.21.3 behavior, everything since then lets shapes leak through the blur
61-
const maskMaterial = (effect as any).maskPass.getFullscreenMaterial()
62-
maskMaterial.maskFunction = MaskFunction.MULTIPLY_RGB_SET_ALPHA
61+
const maskPass = (effect as any).maskPass
62+
maskPass.maskFunction = MaskFunction.MULTIPLY_RGB_SET_ALPHA
6363
return effect
6464
}, [
6565
camera,

0 commit comments

Comments
 (0)