diff --git a/package.json b/package.json index 8ea78b5..726b1b5 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/src/effects/N8AO.tsx b/src/effects/N8AO.tsx index 61b74ca..2051c70 100644 --- a/src/effects/N8AO.tsx +++ b/src/effects/N8AO.tsx @@ -15,11 +15,13 @@ type N8AOProps = { denoiseSamples?: number denoiseRadius?: number color?: ReactThreeFiber.Color + screenSpaceRadius?: boolean } export const N8AO = forwardRef( ( { + screenSpaceRadius, quality, aoRadius = 5, aoSamples = 16, @@ -42,8 +44,9 @@ export const N8AO = forwardRef( 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]) diff --git a/yarn.lock b/yarn.lock index 824eeb7..09065ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"