Open RyugaRyuzaki opened 1 week ago
Turn off half res, increase bias, and reduce radius.
It did not work!
could you send me a copy of your code? Ensure your depth buffer is high-precision.
Hi, all code in upper.I copy exactly this
Okay - are you sure the scale of your scene is near the radius of N8AO. Try enabling screenSpaceRadius
screenSpaceRadius
where can i enable "screenSpaceRadius"?
In 'configuration'.
screenSpaceRadius
HI after change , it works but nothing different base renderer
// this.composer.addPass(this.n8ao);
const {configuration} = this._n8ao;
configuration.aoSamples = 32;
configuration.denoiseSamples = 1;
configuration.denoiseRadius = 13;
configuration.aoRadius = 1;
configuration.distanceFalloff = 4;
configuration.intensity = 5;
configuration.halfRes = true;
configuration.color = new THREE.Color().setHex(0xcccccc, "srgb-linear");
configuration.screenSpaceRadius = true;
Base renderer
this.renderer = new THREE.WebGLRenderer({
canvas: this.canvas,
context: this.canvas.getContext("webgl2")!,
antialias: true,
precision: "highp", // 'lowp', 'mediump', 'highp'
stencil: false,
powerPreference: "high-performance",
logarithmicDepthBuffer: true,
preserveDrawingBuffer: false,
});
this.renderer.setSize(width, height);
this.renderer.setPixelRatio(pixelRatio);
this.renderer.localClippingEnabled = true;
this.renderer.toneMapping = THREE.ACESFilmicToneMapping;
this.renderer.toneMappingExposure = 1.2;
this.renderer.shadowMap.enabled = true;
this.renderer.shadowMap.type = THREE.VSMShadowMap;
this.renderer.shadowMap.autoUpdate = false;
this.renderer.shadowMap.needsUpdate = true;
this.renderer.autoClearStencil = false;
this.renderer.outputColorSpace = THREE.SRGBColorSpace;
this.renderer.xr.enabled = true;
Increase the radius to ~48.
Increase the radius to ~48.
It does not work. Btw i use unique vertices when i calculate posistion in this. And after create geometry i call geometry.computeVertexNormal() and material is :
private readonly material = new THREE.MeshLambertMaterial({
transparent: false,
flatShading: true,
side: THREE.DoubleSide,
clipShadows: true,
clipIntersection: true,
});
Hi i create n8ao with config :
renderer :
How ever when i rotate camera it looks not good like these