I am trying to get this to work without changing the engine render loop. Is there a way to render a scene - once - to a rendertarget outside the normal rendering?
I want to use this rendertarget output as the input to another rendertarget.
Ideally a scene.render() that I can call from anywhere to render that scene - in the case of this playground it would be rttscene.render()
The thing is I need to use the result of the rendertarget as an input to another rendertarget. Is it not possible to render outside the render loop?
If I daisy chain these up and run the chain inside the render loop will that work? eg; render the first target, and then use that as an input to a shader and then render the next render target, and so on?
you can decide when to render, but you need to be sure the resources needed to render are already available (or “ready”). In your case RTT one needs to wait for the resources to render correctly, and then RTT2 needs to wait for RTT1 to render in order to render correctly.
Hi - I am finally able to get back to this project; I have it working, except when I move the plan…it does not move!
You see I set the position.x to 200 in this playground - but the plane always appears centered at 0,0,0 no mater what I set the position to. I have been tearing my hair out about this - why wouldn’t the plane move?
Thanks - not sure why, but 5 mins after I put up this question I changed the position using;
mesh.position = new BABYLON.Vector3(10,0,0) and it moved! Strange that changing it that way worked(?)