[EffectComposer] Issue with 2 consecutive RenderPass
See original GitHub issueThe link
http://demo.bkcore.com/threejs/webgl_tron_glow.html
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.
Issue Analytics
- State:
- Created 12 years ago
- Comments:18 (7 by maintainers)

Top Related StackOverflow Question
Seems like the original demo is no longer working:
FWIW I made a stripped-down demo of selectively applying FX and composing via Additive Blend (using Three.js v79) here: https://www.airtightinteractive.com/demos/selective-fx/
Hey bbiswas, can you add where you created g_occlusion_buffer for this part:
var renderModelOcl = new THREE.RenderPass( g_occlusion_buffer, g_occlusion_camera );