Snapshot Framebuffer | Copies the current color buffer of the rendering. |
The Snapshot Framebuffer node copies (or blits) the current color buffer to a texture usable in the Ventuz scene like any other texture property, e.g. the output of a Texture Loader. Its point in time is determined by the position of the node in the Hierarchy. Also only the current Hierarchy will be snapshotted, Hierarchies in other Layers will not appear on the texture although they might be blended in the Layer Editor. You can enable MipMaps and get the Texture as well as its Width and Height as outputs.
Note that the Snapshot Framebuffer node will not render its Subtree to a render target. Practically you get the rendering of the Hierarchy Tree up until the node.
This image illustrates which parts of the hierarchy will be visible on the resulting texture (green frame). It is important to note that the subtree (red frame) of the Snapshot Framebuffer node is not visible on the texture, because the node simply copies the already existing rendering onto a new space on the GPU memory, instead of changing the current render target to that space while rendering the subtree. Below you can see the resulting texture of the above Snapshot Framebuffer node and what the resulting rendering will look like.
As opposed to the Offscreen Render Target Layer the Snapshot Framebuffer node enables you to grab the color buffer of a Layer without having to use it inside another Layer. This way you can grab the current rendering without having to drop any of the buffers - e.g. the geometry using the generated texture can depth test against the original rendering which can be very useful in applications like creating a Refraction.