You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm porting BkCore's Volumetric light example to THREE r60.
Here are the steps-
1.building the main scene,
2.cloning the main scene as the occlusion scene,
3. do a few shader passes on the occlusion scene - (i.e. the godray pass ) - Effect Composer #1
4. pass the result of the godray pass as a texture to an additive blend shader that will finally blend in the godray pass with the render pass for the main scene. - Effect Composer #2
Using two effect composers to retain depth buffers. When I render the final scene, only the main scene is rendered and the results of the godray pass from Effect Composer #1 just does not show up.
If I save the EC#1 results into a texture and add it to the main scene, then I can see it. That's not the effect I want but it means EC#1 is working.
If I move my additive blend shader inside EC#1, I see the godrays. Which means the passing of the rendertarget1 from EC#1 as texture into the additive shader is also working.
It's only when I use a separate Effect Composer for the main scene, that the results of the previous composer gets lost.
I've tried with renderer.PreserveDrawingBuffer = true but that didn't work. I've tried setting autoclear to false but that wasn't it.
If I render EC#1 after EC#2 turning the godray shader's output-to-screen to true, then I can see the godrays but no models and vice versa if I swap it other way.
Looks like maybe the framebuffer is getting detroyed?
The text was updated successfully, but these errors were encountered:
bbiswas
changed the title
Chaining Effect Composers in THREEjs seems to destroy the framebuffer
Chaining Effect Composers in THREEjs r60 is destroying the buffer from the first Composer - Volumetric Light
Apr 15, 2014
I'm porting BkCore's Volumetric light example to THREE r60.
Here are the steps-
1.building the main scene,
2.cloning the main scene as the occlusion scene,
3. do a few shader passes on the occlusion scene - (i.e. the godray pass ) - Effect Composer #1
4. pass the result of the godray pass as a texture to an additive blend shader that will finally blend in the godray pass with the render pass for the main scene. - Effect Composer #2
Using two effect composers to retain depth buffers. When I render the final scene, only the main scene is rendered and the results of the godray pass from Effect Composer #1 just does not show up.
If I save the EC#1 results into a texture and add it to the main scene, then I can see it. That's not the effect I want but it means EC#1 is working.
If I move my additive blend shader inside EC#1, I see the godrays. Which means the passing of the rendertarget1 from EC#1 as texture into the additive shader is also working.
It's only when I use a separate Effect Composer for the main scene, that the results of the previous composer gets lost.
I've tried with renderer.PreserveDrawingBuffer = true but that didn't work. I've tried setting autoclear to false but that wasn't it.
If I render EC#1 after EC#2 turning the godray shader's output-to-screen to true, then I can see the godrays but no models and vice versa if I swap it other way.
Looks like maybe the framebuffer is getting detroyed?
Kinda out of ideas...
Thanks!
The text was updated successfully, but these errors were encountered: