R147 SSAA is very bright

Hey! I just updated my project from r137 to r147. Now im having an issue with using the SSAARenderPass. It is making the scene much brighter than before. Im using SSAA, SAO and GammaCorrectionShader all together, but only the SSAA seems to affect the behavior

From the r147 example, i cannot see any difference.
I tried not using a RenderTarget, I added the CopyShader, tried different settings.

Changing the SSAA.sampleLevel to a lower value actually darkens everything again, but a sampleLevel of 0 is basicly no antialiasing and not usable.


        // SSAA
        this.ssaaRenderPass = new SSAARenderPass(this.scene, this.persCamera, )
        this.ssaaRenderPass.setSize(this.w, this.h)
        this.ssaaRenderPass.unbiased = true
        this.ssaaRenderPass.sampleLevel = 3
        this.ssaaRenderPass.renderToScreen = false
        this.ssaaRenderPass.clearAlpha = 1.0
        this.ssaaRenderPass.clearColor = 0x000000

        // RenderTarget for SSAA
        const sampleRenderTarget = new THREE.WebGLRenderTarget( this.w, this.h, parameters );
        this.ssaaRenderPass.sampleRenderTarget = sampleRenderTarget;

        // Ambient Occlusion
        this.SAO = new SAOPass(this.scene, this.persCamera, false, true)
        this.SAO.resolution.set(2048, 2048)
        this.SAO.params.saoBias = this.config.sao.saoBias
        this.SAO.params.saoIntensity = this.config.sao.saoIntensity
        this.SAO.params.saoScale = this.config.sao.saoScale
        this.SAO.params.saoKernelRadius = this.config.sao.saoKernelRadius
        this.SAO.params.saoBlurRadius = this.config.sao.saoBlurRadius
        this.SAO.params.saoMinResolution = this.config.sao.saoMinResolution

        this.copyPass = new ShaderPass( CopyShader )
        this.copyPass.setSize(this.w, this.h)

        // Order matters here
        this.renderComposer.addPass(this.ssaaRenderPass)
        this.renderComposer.addPass(this.copyPass) // New in r147
        this.renderComposer.addPass(this.SAO)
        this.renderComposer.addPass(this.gammaCorrection)

Im trying to make a jsfiddle too. Is it possible to use importmaps in r147? its not working

Any help is appreciated
Thanks

Do you mind upgrading to an even higher version of three.js? There were lately some significant updates and fixes to the post processing classes. SAOPass also received performance improvements in r156. The SSAA issue should be fixed since r154.

2 Likes

I was upgrading to r147 to use the three-gpu-pathtracer which till recently was at r147. Now its at r151, but its actually working with r156 too. So this may fix the problem. Ill come back here, when I migrated my project to r156 and the lighting changes in r155.
Thanks