CURATED WORKFLOW
Compose fog correctly across a portal/secondary view without black tiles or double falloff
rendering/engine-internal evidence; supported game composition unresolved not runtime verifiedWorkflow ID: workflow.fog-view-resource-lifecycle
Snapshot: 3ba1c69afc74a97f-7fcd0798fd6ea455
Prerequisites
- A primary and destination view with explicit depth/viewport state
- Fog/volume settings or shader interfaces actually exposed to the game
- A resource lifetime plan for render targets and temporal history
Ordered steps
| # | Action | State/evidence | Symbols |
|---|---|---|---|
| 1 | Inventory native fog, volume and per-view resource declarations and classify their execution scope. | metadata-only Public visibility and source visibility are not enough to call the hook. | property:Sandbox.CameraComponent:Viewport(), property:Sandbox.SceneCamera:VolumetricFog(), property:Sandbox.VolumetricFogParameters:Scattering(), type:Sandbox.VolumetricFogParameters, type:Sandbox.VolumetricFogVolume |
| 2 | Render entry-side travel and exit-side travel with explicit depth/projection/resource bindings. | unresolved No direct indexed relationship guarantees two-space fog composition. | method:Sandbox.CameraComponent:RenderToTexture(Sandbox.Texture,Sandbox.Rendering.ViewSetup), property:Sandbox.CameraComponent:Viewport(), property:Sandbox.SceneCamera:CustomProjectionMatrix(), type:Sandbox.RenderTarget, type:Sandbox.Rendering.ViewSetup |
| 3 | Release/restore view-specific targets, history, tile/cluster state and exposure after the pass. | source-demonstrated Implementation evidence may be engine-internal; a runtime capture is required. | method:Sandbox.Rendering.CommandList:ReleaseRenderTarget(Sandbox.Rendering.RenderTargetHandle), method:Sandbox.Rendering.CommandList:SetRenderTarget(Sandbox.Rendering.RenderTargetHandle), property:Sandbox.CameraComponent:AutoExposure(), property:Sandbox.Diagnostics.PerformanceStats.Timings:History(), type:Sandbox.Rendering.RenderTargetHandle |
Lifecycle and ordering
- Per-view resources must be created/bound before the view and released/restored after it.
- Viewport/projection changes must be paired with depth/history bindings; fog toggles are diagnostics, not acceptance.
State ownership
- The renderer owns per-view GPU state; the portal feature owns only its composition inputs and recursion budget.
- Do not mutate global fog as a portal workaround.
Resource lifetime
- Destination render target, depth, fog/volume resources and temporal history must remain valid for the complete pass.
- Restore the previous render target/viewport/history after secondary rendering.
Known failure modes
- Exit-side fog can reuse entry viewport/history or mismatched tile dimensions, producing black/undefined tiles.
- Applying native fog after composition may omit or double-apply path length.
- Disabling fog or tiled rendering is a diagnostic comparison only.
Evidence and unresolved questions
curated; not a complete workflow graph
- Exact game-exposed fog/volume hooks and shader contracts.
- Tile/cluster dimensions and custom projection depth reconstruction for recursive views.
- Whether light/shadow transport is supported separately from matching the destination view.
Next useful probe: Run fog on/off and tiled/clustered on/off captures across viewport sizes and recursion depths, logging resource bindings and depth reconstruction.