render.SetRenderTargetEx
Description
Sets the render target with the specified index of COLOR[n] to the specified rt, allowing you to work with Multiple Render Targets (MRT). Since standard shaders don't use MRT, you might find this useful at Shaders/screenspace_general.
MRT doesn't work with 2D render functions like render.DrawScreenQuad. Instead, you can render a render.DrawQuad using cam.Start2D.
If you try to render with MSAA and set the main RenderTarget with another RenderTarget, nothing will be rendered.
Link to Direct3D 9 documentation on MRT
Multiple render targets have the following restrictions:
- No antialiasing is supported.
Arguments
Example
Multiple Render Targets in a 2D context:
Garry's Mod
Rust
Steamworks
Wiki Help