public sealed class TextureCopyRendererA snapshot of one target in another, as a transfer pass.
Remarks
What [35 § B1](../../../docs/plan/35-water.md#b1-there-is-no-shading-model-that-can-read-the-scene-behind-it) turned out to need, and it is not the pass. The compositor could already express "run after deferred lighting, read the scene colour, write the scene colour" — ReflectionTrace binds sceneColor today. What it could not express is the part that makes that legal: sampling a target a pass is also writing is undefined behaviour, so the read has to come from somewhere else, and that somewhere has to be a resource the graph knows the lifetime of.
The graph is what makes this worth a node. A copy recorded by hand needs two barriers around it, needs to know whether its source is still a colour attachment, and becomes wrong the moment a pass is inserted before it. Declared, it is two resource uses and the graph derives the rest — including dropping the whole copy when nothing reads the destination, which is what makes a document that has a water node cost nothing in a scene with no water.
⚠ Refuses rather than rescales. A copy needs matching formats and matching sizes; where they differ the operation a caller wants is a blit, which is a draw and a different node. Silently taking the smaller region would produce a scene-colour copy that is correct in the top-left corner, which is exactly the kind of wrong that survives review.
Fields and properties (3)
public required string SourceThe name of the target to copy, which must be declared as a copy source.
public required string DestinationThe name of the target it goes into, which must be declared as a copy destination.
public int CopyCountHow many frames have been copied.
Methods (1)
protected internal override void Build(GraphicsCompositor compositor, CompositorFrame frame)Declares this node's render-graph passes.
Used by (3)
- CompositorAssetTestsVixen.Rendering.Tests
- CompositorBuilderVixen.Rendering
- TextureCopyTestsVixen.Rendering.Tests