From 0cc5e1e6124046bb15bf2bdf3bac2c3afd7ad629 Mon Sep 17 00:00:00 2001 From: seantai Date: Wed, 31 May 2023 14:36:20 -0700 Subject: [PATCH] fix: missing n8ao renderMode prop --- src/effects/N8AO.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/effects/N8AO.tsx b/src/effects/N8AO.tsx index 2051c70..b53ad05 100644 --- a/src/effects/N8AO.tsx +++ b/src/effects/N8AO.tsx @@ -16,6 +16,7 @@ type N8AOProps = { denoiseRadius?: number color?: ReactThreeFiber.Color screenSpaceRadius?: boolean + renderMode?: 0 | 1 | 2 | 3 | 4 } export const N8AO = forwardRef( @@ -30,6 +31,7 @@ export const N8AO = forwardRef( distanceFalloff = 1, intensity = 1, color, + renderMode = 0, }, ref: Ref ) => { @@ -45,8 +47,19 @@ export const N8AO = forwardRef( denoiseSamples, denoiseRadius, screenSpaceRadius, + renderMode, }) - }, [screenSpaceRadius, color, aoRadius, distanceFalloff, intensity, aoSamples, denoiseSamples, denoiseRadius]) + }, [ + screenSpaceRadius, + color, + aoRadius, + distanceFalloff, + intensity, + aoSamples, + denoiseSamples, + denoiseRadius, + renderMode, + ]) useLayoutEffect(() => { if (quality) effect.setQualityMode(quality.charAt(0).toUpperCase() + quality.slice(1)) }, [quality])