From 7f6e394918736d54c35212c3a84405dbb7f2db19 Mon Sep 17 00:00:00 2001 From: Davide Cristini Date: Fri, 2 Feb 2024 09:58:46 +0100 Subject: [PATCH] fix(DoF): mask function (#262) --- src/effects/DepthOfField.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/effects/DepthOfField.tsx b/src/effects/DepthOfField.tsx index 9a05ad3..7b3e0b8 100644 --- a/src/effects/DepthOfField.tsx +++ b/src/effects/DepthOfField.tsx @@ -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,