[EffectComposer] Issue with 2 consecutive RenderPass

The link


The code

glowcomposer = new THREE.EffectComposer( renderer, renderTarget );

glowcomposer.addPass( renderModelGlow ); // RenderPass
glowcomposer.addPass( hblur ); // ShaderPass
glowcomposer.addPass( vblur ); // ShaderPass
glowcomposer.addPass( effectSave ); // SavePass

glowcomposer.addPass( renderModel ); // RenderPass
glowcomposer.addPass( finalPass ); // ShaderPass

The context

I got two scenes with the same object/camera/light. One with the diffuse texture (http://demo.bkcore.com/threejs/webgl_tron.html) and one with a glow texture (glowing areas are white on black).

My rendering pipeline is as follow :
I first render the glow scene and apply a H/V blur to it, then store the output into a frameBuffer using a SavePass.
Then I want to render the diffuse scene.
And finally mix that with the glow framebuffer.

The issue

My glow sampler2D is passing well to my finalPass shader, but as you can see in the demo, the second RenderPass call for the diffuse scene is not performing well. It only outputs black.

I tried to render the diffuse scene in a single Render pass and that works. It’s when I use it as a second RenderPass that it’s not working.

Any ideas ?

Thank you.
Thibaut D.

Author: Fantashit

1 thought on “[EffectComposer] Issue with 2 consecutive RenderPass

Comments are closed.