Skip to content

Commit

Permalink
Merge pull request #218 from seantai/fix/n8ao-rendermode
Browse files Browse the repository at this point in the history
fix(N8AO): missing renderMode prop
  • Loading branch information
drcmda authored Jun 1, 2023
2 parents aedb714 + 0cc5e1e commit e4a0482
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/effects/N8AO.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type N8AOProps = {
denoiseRadius?: number
color?: ReactThreeFiber.Color
screenSpaceRadius?: boolean
renderMode?: 0 | 1 | 2 | 3 | 4
}

export const N8AO = forwardRef<N8AOPostPass, N8AOProps>(
Expand All @@ -30,6 +31,7 @@ export const N8AO = forwardRef<N8AOPostPass, N8AOProps>(
distanceFalloff = 1,
intensity = 1,
color,
renderMode = 0,
},
ref: Ref<N8AOPostPass>
) => {
Expand All @@ -45,8 +47,19 @@ export const N8AO = forwardRef<N8AOPostPass, N8AOProps>(
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])
Expand Down

0 comments on commit e4a0482

Please sign in to comment.