How to use multi renderTarget.I want to achieve transmission effect

I checked the source code of others engines,I found they use the opaque meshs render result as a texture to the transmission extensions shader.
I want to get render result,when like the scene is rendered with half of the meshs.and I found some function like setCamera() and renderForward() this is the rendering core?
Maybe I can use a new layer to save the render result.but will this increase rendering pressure.

If the question is how to render to a render target, we have some examples:

http://playcanvas.github.io/#/graphics/render-to-texture
https://developer.playcanvas.com/en/tutorials/resolution-scaling/
https://developer.playcanvas.com/en/tutorials/capturing-a-screenshot/

Ho @yaustar.

You can check the bloom effect on how it uses multiple render targets:

https://playcanvas.github.io/#/graphics/post-effects

And here is the code:

thinks,These are the results of the rendering of the current frame after the rendering is completed,I want to get obtain the current result directly during rendering.

This is the example you’re looking for
http://playcanvas.github.io/#/graphics/grab-pass

1 Like

Thanks, this should help me.

Note that at the moment, each time a material with texture_grabPass texture is used, a backbuffer is copied to a texture, which is not cheap. We do not have a feature where this copy takes place only one time (after all opaque meshes), allowing you to use the same texture multiple times.

1 Like