Falcor icon indicating copy to clipboard operation
Falcor copied to clipboard

Question for supporting multiple camera in RenderGraph

Open KaChen-Dex opened this issue 5 years ago • 1 comments

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.

KaChen-Dex avatar Jul 29 '19 17:07 KaChen-Dex

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

nbentyNV avatar Aug 05 '19 19:08 nbentyNV