Skip to content

Commit

Permalink
fix: n8ao update
Browse files Browse the repository at this point in the history
  • Loading branch information
drcmda committed May 26, 2023
1 parent a9a49f6 commit 046fb7f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},
"dependencies": {
"maath": "^0.5.3",
"n8ao": "^1.3.1",
"n8ao": "^1.4.0",
"postprocessing": "^6.31.0",
"screen-space-reflections": "2.5.0",
"three-stdlib": "^2.21.10"
Expand Down
5 changes: 4 additions & 1 deletion src/effects/N8AO.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ type N8AOProps = {
denoiseSamples?: number
denoiseRadius?: number
color?: ReactThreeFiber.Color
screenSpaceRadius?: boolean
}

export const N8AO = forwardRef<N8AOPostPass, N8AOProps>(
(
{
screenSpaceRadius,
quality,
aoRadius = 5,
aoSamples = 16,
Expand All @@ -42,8 +44,9 @@ export const N8AO = forwardRef<N8AOPostPass, N8AOProps>(
aoSamples,
denoiseSamples,
denoiseRadius,
screenSpaceRadius,
})
}, [color, aoRadius, distanceFalloff, intensity, aoSamples, denoiseSamples, denoiseRadius])
}, [screenSpaceRadius, color, aoRadius, distanceFalloff, intensity, aoSamples, denoiseSamples, denoiseRadius])
useLayoutEffect(() => {
if (quality) effect.setQualityMode(quality.charAt(0).toUpperCase() + quality.slice(1))
}, [quality])
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7645,10 +7645,10 @@ mute-stream@~1.0.0:
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e"
integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==

n8ao@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/n8ao/-/n8ao-1.3.1.tgz#03e4a06005a443fb187bf63ec241940e14a5c082"
integrity sha512-lwt88T/DjJbmIcZFT8y9mX4BpSR4n4+SnNaMB9+QZ0eupNlPfsD751bJn2DfDs3kkobzXrsyOP86EgUBJ2vODA==
n8ao@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/n8ao/-/n8ao-1.4.0.tgz#d8dcd7b40e6f96ffbd44f6e864c951c8903393ae"
integrity sha512-axoNWmNWsazA+cvrne7yqqha1XbBNEgCwYm+0oBIxjGd7usME+GQABM4rbEQUcRowSDVHeSniZ/NLd4kh7KJLw==

nanoid@^3.3.1, nanoid@^3.3.6:
version "3.3.6"
Expand Down

0 comments on commit 046fb7f

Please sign in to comment.