Qustion about Scene Switch Animate

Hi~
I want to create a scene-switch postprocess animate when I switch scene.
I create an Switch Scene with a postprocess to lerp from rtt_1 to rtt_2 with switch process
In my way (switch from scene1 to scene2):
1.render scene1 into rtt_1
2.render scene2 into rtt_2
3.set rtt_1 , rtt_2 and switch process into postprocess
4.render switch scene.
I don’t know how to render scene into RenderTargetTexture directly.

if rtt_1 is a customRenderTarget in scene1,rtt_2 is a customRenderTarget in scene2,
in engine.runRenderLoop()
scene1.render() //render scene1 to rtt_1, render scene to screen 2X DrawCall
scene2.render() //render scene2 to rtt_2, render scene to screen 2X DrawCall
switchScene.render() //render 1 postprocess to screen.

I read the babylonjs-master, this way may work?

This should help Slide In Animation When Switching Scenes - #2 by Cedric

1 Like

Your way should work, I recommend having Spector Spector.js - Chrome Web Store (google.com) handy to check your rendering just in case :smile:

1 Like