Synchronized offscreen rendering #1418
-
If one wanted to render offscreen (say, with a different set of shaders), but maintain the same camera/view of the scene - what is the best approach? I looked at the vsgExamples/vsgoffscreenshot example, but that showed creating a new camera with a different perspective matrix (to account for a difference in resolution). I assume this is to account for DPI aspect differences? Is it necessary to create a camera per view (and thus, per RenderGraph)? Is it possible to share a View between RenderGraphs? (forgive the naivete, I did look at the source - but there's quite a bit of intricate code). Also, I'm curious about the best time to handle resizing the Framebuffer and Image/ImageView? I current attach a Visitor to the viewer with addEventHandler that handles the vsg::ConfigureWindowEvent, but I wonder if this is too late/early? In the vsgoffscreenshot example, I see that resizing is done in the main loop just before update(). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you want to share the same viewpoint but have everything else different then just share the ViewMatrix between the Camera or the separate RenderGraph/View. |
Beta Was this translation helpful? Give feedback.
If you want to share the same viewpoint but have everything else different then just share the ViewMatrix between the Camera or the separate RenderGraph/View.