Falcor
Falcor copied to clipboard
Question for supporting multiple camera in RenderGraph
Hi, Can I ask what is the correct way of render with different cameras in RenderGraph? Is it expected to have different render graph for each camera or one RenderGraph for multiple camera? What is the suggested way to set different camera? or set camera for shadow map? is there a sample for it? thanks.
The answer depends on what you want to do with multiple cameras.
You can store multiple cameras in Scene
.
A render-pass can fetch and bind one or more cameras to the shaders.
If this if for shadow-maps, I suggest a render-pass per camera. Store the cameras in Scene
, then each pass can fetch a specific camera using a pre-defined index. The rest of the code should be similar to the CSM class