I’m having some problems to integrate these pp methods, i wrote this
target = new THREE.WebGLRenderTarget( innerWidth, innerHeight, {
format: THREE.RGBAFormat,
type: THREE.FloatType
} );
composer = new EffectComposer( renderer, target );
composer.setPixelRatio( window.devicePixelRatio ); // ensure pixel ratio is always 1 for performance reasons
taaRenderPass = new TAARenderPass( scene, camera, 0x000000, 0 );
taaRenderPass.enabled = TAAparam.TAAEnabled;
taaRenderPass.sampleLevel = TAAparam.TAASampleLevel;
taaRenderPass.unbiased = true;
let ssrPass = new SSRPass( {
renderer,
scene,
camera,
width: window.innerWidth,
height: window.innerHeight,
groundReflector: null,
selects: ssrSelections
} );
ssrPass.maxDistance = 180;
ssrPass.camera = camera;
ssrPass.opacity = 1;
ssrPass.thickness = 0.18;
renderPass = new RenderPass( scene, camera );
renderPass.enabled = false;
gammaCorrection = new ShaderPass(GammaCorrectionShader);
let copyPass = new ShaderPass( CopyShader );
copyPass.renderToScreen = false;
//add pass
composer.addPass( renderPass );
//composer.addPass( ssaaRenderPass );
//composer.addPass( saoPass );
composer.addPass( ssrPass );
composer.addPass( taaRenderPass );
composer.addPass( gammaCorrection );
composer.addPass( copyPass );
window.addEventListener( 'resize', onWindowResize );
}
function onWindowResize() {
const width = window.innerWidth;
const height = window.innerHeight;
camera.aspect = width / height;
camera.updateProjectionMatrix();
renderer.setSize( width, height );
composer.setSize( width, height );
}
function animate() {
if ( taaRenderPass && renderState === RenderState.Moving) {
taaRenderPass.accumulate = false;
}
if ( taaRenderPass && renderState === RenderState.Static) {
taaRenderPass.accumulate = true;
}
composer.render();
controls.update(); // required if damping enabled
stats.update();
requestAnimationFrame( animate );
}
But i only obtain the reflection at the first frame and when i move it disappear.
I also obtain a cartoon effect on the texture when the TAA.accumulate = true.
Thanks