CURATED WORKFLOW
Render a secondary camera view into a render target for composition
game-or-shared-unknown; exact installed availability unresolved not runtime verifiedWorkflow ID: workflow.secondary-view-rendering
Snapshot: 3ba1c69afc74a97f-7fcd0798fd6ea455
Prerequisites
- A valid CameraComponent
- A named/renderable RenderTargetHandle
- A render-phase callback permitted to enqueue a CommandList operation
Ordered steps
| # | Action | State/evidence | Symbols |
|---|---|---|---|
| 1 | Resolve an exact camera and render-target declaration before writing a call. | metadata-only Exact declarations are direct evidence; callability still needs installed-build verification. | type:Sandbox.CameraComponent, type:Sandbox.Rendering.RenderTargetHandle |
| 2 | Schedule the secondary view through the render command list and pass ViewSetup rather than assuming a main-view side effect. | source-demonstrated The source call site demonstrates ordering/guard conditions, but its relationship to game code remains scope-sensitive. | method:Sandbox.CameraComponent:RenderToTexture(Sandbox.Texture,Sandbox.Rendering.ViewSetup), method:Sandbox.Rendering.CommandList:DrawView(Sandbox.CameraComponent,Sandbox.Rendering.RenderTargetHandle,Sandbox.Rendering.ViewSetup), type:Sandbox.Rendering.ViewSetup |
| 3 | Keep recursion/history/resource lifetime bounded and restore the render target state after composition. | source-demonstrated Resource/state cleanup is inferred from surrounding implementation and must be probed. | method:Sandbox.Rendering.CommandList:GetRenderTarget(System.String,Sandbox.ImageFormat,System.Int32,System.Int32), method:Sandbox.Rendering.CommandList:ReleaseRenderTarget(Sandbox.Rendering.RenderTargetHandle), method:Sandbox.Rendering.CommandList:SetRenderTarget(Sandbox.Rendering.RenderTargetHandle), property:Sandbox.CameraComponent:Viewport(), type:Sandbox.RenderTarget |
Lifecycle and ordering
- Run from the documented/observed render scheduling phase; do not call arbitrary render-state methods outside an active render block without evidence.
- Secondary views may be prevented from recursively drawing reflections or child views by internal guards.
State ownership
- The feature owns the secondary-view scheduling intent; the renderer owns actual GPU state.
- Do not mutate the main camera or global render state as a substitute for a separate view.
Resource lifetime
- Render target must exist before DrawView/RenderToTexture executes.
- Any temporary view setup, target binding and history state must be restored or released at the end of the pass.
Known failure modes
- Invalid camera/target causes the implementation to return without drawing.
- Recursive secondary views can be explicitly suppressed, producing a fallback rather than recursion.
- A public declaration may still be unavailable to game code or differ in the installed build.
Evidence and unresolved questions
curated; not a complete workflow graph
- Whether this exact release's render command scheduling is game-callable.
- How temporal history, fog and exposure are bound for a custom secondary view.
- Whether the target can be safely reused across recursive portal views.
Next useful probe: Run an installed-engine minimal secondary-view capture with one camera, one render target and recursion disabled; record pass ordering, viewport, history and cleanup.