Closed gpeu closed 2 months ago
I think 1.9.0 introduced a typo:
https://github.com/N8python/n8ao/commit/c36cae48c26265c4d402738b4d8ffd52d5ec521d#diff-b2f10412321e2b27f8c3677485159748118b3e526673303c7d017ed5388e2ef0R431
- configureDenoisePass(logarithmicDepthBuffer = false) { + configureDenoisePass(logarithmicDepthBuffer = false, ortho = false) { this.firstFrame(); this.samplesDenoise = this.generateDenoiseSamples(this.configuration.denoiseSamples, 11); const p = {...PoissionBlur }; p.fragmentShader = p.fragmentShader.replace("16", this.configuration.denoiseSamples); if (logarithmicDepthBuffer) { p.fragmentShader = "#define LOGDEPTH\n" + p.fragmentShader; } + if (ortho) { + e.fragmentShader = "#define ORTHO\n" + e.fragmentShader; + } if (this.poissonBlurQuad) { this.poissonBlurQuad.material.dispose(); this.poissonBlurQuad.material = new THREE.ShaderMaterial(p); } else { this.poissonBlurQuad = new FullScreenTriangle(new THREE.ShaderMaterial(p)); } }
The shader is p in the other function, but it is e in this one.
p
e
Unfortunately I failed to make the example work with an Orthographic camera. No AO shadow is visible with this change.
// const camera = new THREE.PerspectiveCamera(75, clientWidth / clientHeight, 0.1, 1000); const camera = new THREE.OrthographicCamera();
This is true - multiple errors introduced. Expect a fix for 1.9.1
Orthographic camera support reintroduced. Log depth buffers don't work with ortho cameras.
Yay! Well done
I think 1.9.0 introduced a typo:
https://github.com/N8python/n8ao/commit/c36cae48c26265c4d402738b4d8ffd52d5ec521d#diff-b2f10412321e2b27f8c3677485159748118b3e526673303c7d017ed5388e2ef0R431
The shader is
p
in the other function, but it ise
in this one.Unfortunately I failed to make the example work with an Orthographic camera. No AO shadow is visible with this change.