Using UnrealBloomPass causes shadow acne

Hi, guys.

I’ve been learning Threejs for a while now, I don’t enable shadow in my scene. When I practice UnrealBloomPass, I always get circles of shadows, which seems to be exacerbated by UnrealBloomPass. It seems to have something to do with the lights, when turn off the lights, the streaks disappear. Moreover, transparent materials no longer look pure. How can i make the post-processing result more soft and smooth? Any suggestions and discussions are welcome.

By the way, my code is based on this example.
unrealBloom selective

Use UnrealBloomPass:




When not using UnrealBloomPass:


Maybe will be usefull Colour banding - Wikipedia

1 Like

If you aren’t already, use HalfFloatType for your render targets. This is the default in three.js r153+.

1 Like

Wow, this is a breakthrough in one of the problems. On the one hand, I got to know this more technical term. On the other hand, I used ‘band’ to search other posts and specify rendertargets for finalComposer.

const parameters = {
minFilter: THREE.LinearFilter,
magFilter: THREE.LinearFilter,
format: THREE.RGBAFormat,
encoding: THREE.sRGBEncoding
};

const renderTarget = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, parameters );
this.finalComposer = new EffectComposer(this.renderer, renderTarget);

Good effect.

This solves the colour banding problem.Thank you for your answer, have a good day!

2 Likes

Oh, I’m still use the 145. The colour banding problem is due to the fact that I don’t specify a renderTarget for EffectComposer.

Yes, HalfFloatType is also present in 145. Now, I have specified a type for renderTarget: THREE.HalfFloatType.

After a while, I will upgrade to the latest version and evaluate if this will affect my previous work. Appreciate it!

1 Like