What is the best way to handle split screen rendering in Flax Engine? I know that we can render cameras to textures, and then probably set that to some sort of UI element, but I was wondering if there is a better way to do this, preferably one that can update the aspect ratio, render scale, etc. in real-time.
I would use two (or more) Image
controls added to game viewport (eg. directly to RootControl.GameRoot
) with Brush
set to GPUTextureBrush
that would use the render output of the camera for each player view. To render the scene to texture use sth like this tutorial: HOWTO: Render a camera to a texture | Flax Documentation. To optimize it you could disable the in-built main viewport rendering (see MainRenderTask.Instance
).
Thanks. Seems like a very customizable method.