Hi~ I’m adding FXAA with composer.
This is current issue:
my code:
renderer.setSize( window.innerWidth, window.innerHeight );
...
camera = new THREE.PerspectiveCamera( 40, window.innerWidth / window.innerHeight, 1, 1000 );
const pixelRatio = renderer.getPixelRatio();
fxaaPass.material.uniforms[ 'resolution' ].value.x = 1 / ( container.offsetWidth * pixelRatio );
fxaaPass.material.uniforms[ 'resolution' ].value.y = 1 / ( container.offsetHeight * pixelRatio );
composer.addPass( renderPass );
composer.addPass( fxaaPass );
function render() {
renderer.outputEncoding = THREE.sRGBEncoding;
// renderer.render( scene, camera );
composer.render();
}
function animate() {
requestAnimationFrame( animate );
render();
Is there have something wrong? How can I fix it? Thank you~