|
IVSmoke 1.0
|
#include <IVSmokeRenderer.h>

Public Member Functions | |
| void | Initialize () |
| void | Shutdown () |
| bool | IsInitialized () const |
| TSharedPtr< FPerWorldData > | GetOrCreateWorldData (UWorld *World) |
| TSharedPtr< FPerWorldData > | GetWorldData (UWorld *World) |
| void | CleanupWorldData (UWorld *World) |
| bool | bIsServerTimeSynced (UWorld *World) |
| void | SetServerTimeOffset (UWorld *World, float InServerTimeOffset) |
| FIVSmokePackedRenderData | PrepareRenderData (UWorld *World, const TArray< AIVSmokeVoxelVolume * > &InVolumes, const FVector &CameraPosition) |
| void | SetCachedRenderData (UWorld *World, FIVSmokePackedRenderData &&InRenderData) |
| FScreenPassTexture | Render (FRDGBuilder &GraphBuilder, const FSceneView &View, const FPostProcessMaterialInputs &Inputs) |
| void | RunPrePassPipeline (FRDGBuilder &GraphBuilder, const FSceneView &View, const struct FRenderTargetBindingSlots &RenderTargets, TRDGUniformBufferRef< FSceneTextureUniformParameters > SceneTextures) |
| void | ClearViewDataForViewFamily (const FSceneViewFamily &ViewFamily) |
Static Public Member Functions | |
| static FIVSmokeRenderer & | Get () |
Static Public Attributes | |
| static constexpr int32 | MaxSupportedVolumes = 128 |
Manages registered smoke volumes and handles rendering. Owns shared rendering resources (noise volume) and reads settings from UIVSmokeSettings.
ARCHITECTURE: Per-World Data
See Docs/IVSmoke_RendererArchitecture.md for detailed documentation.
Definition at line 264 of file IVSmokeRenderer.h.
| bool FIVSmokeRenderer::bIsServerTimeSynced | ( | UWorld * | World | ) |
Check if server time offset was set for a World.
Definition at line 214 of file IVSmokeRenderer.cpp.
| void FIVSmokeRenderer::CleanupWorldData | ( | UWorld * | World | ) |
Cleanup and remove per-world data. Called automatically when World is destroyed (via delegate). IMPORTANT: Calls FlushRenderingCommands() to ensure GPU safety.
| World | The world to cleanup |
Definition at line 179 of file IVSmokeRenderer.cpp.
|
inline |
Clear per-view data for a specific ViewFamily. Called at end of ViewFamily rendering.
Definition at line 597 of file IVSmokeRenderer.h.
|
static |
Definition at line 33 of file IVSmokeRenderer.cpp.
| TSharedPtr< FPerWorldData > FIVSmokeRenderer::GetOrCreateWorldData | ( | UWorld * | World | ) |
Get or create per-world data for a specific World. Creates new FPerWorldData if not exists and registers cleanup delegate. Must be called on Game Thread.
| World | The world to get data for |
Definition at line 125 of file IVSmokeRenderer.cpp.
| TSharedPtr< FPerWorldData > FIVSmokeRenderer::GetWorldData | ( | UWorld * | World | ) |
Get per-world data for a specific World (read-only). Returns nullptr if World is not registered. Thread-safe (uses mutex internally).
| World | The world to get data for |
Definition at line 164 of file IVSmokeRenderer.cpp.
| void FIVSmokeRenderer::Initialize | ( | ) |
Initialize renderer resources. Called on first use or settings change.
Definition at line 50 of file IVSmokeRenderer.cpp.
|
inline |
Check if renderer is initialized with valid resources.
Definition at line 279 of file IVSmokeRenderer.h.
| FIVSmokePackedRenderData FIVSmokeRenderer::PrepareRenderData | ( | UWorld * | World, |
| const TArray< AIVSmokeVoxelVolume * > & | InVolumes, | ||
| const FVector & | CameraPosition | ||
| ) |
Prepare render data from all registered volumes for a specific World. Must be called on Game Thread. Copies and packs all volume data for safe Render Thread access. If volume count exceeds MaxSupportedVolumes (128), filters by distance from camera. Skips processing if already called this frame (uses LastPreparedFrameNumber).
| World | The world these volumes belong to |
| InVolumes | Array of volumes to process |
| CameraPosition | Camera world position for distance-based filtering |
Definition at line 458 of file IVSmokeRenderer.cpp.
| FScreenPassTexture FIVSmokeRenderer::Render | ( | FRDGBuilder & | GraphBuilder, |
| const FSceneView & | View, | ||
| const FPostProcessMaterialInputs & | Inputs | ||
| ) |
Main render entry point called from SceneViewExtension.
| GraphBuilder | RDG builder |
| View | Current scene view |
| Inputs | Post-process material inputs |
Definition at line 902 of file IVSmokeRenderer.cpp.
| void FIVSmokeRenderer::RunPrePassPipeline | ( | FRDGBuilder & | GraphBuilder, |
| const FSceneView & | View, | ||
| const struct FRenderTargetBindingSlots & | RenderTargets, | ||
| TRDGUniformBufferRef< FSceneTextureUniformParameters > | SceneTextures | ||
| ) |
Execute Pre-pass pipeline: Ray March → Upscale → UpsampleFilter → Depth Write. Called from PostRenderBasePassDeferred_RenderThread BEFORE Translucent Pass. Results are cached for Post-process Visual/Composite passes.
Pipeline order ensures Ray March reads only opaque depth (before smoke depth write).
| GraphBuilder | RDG builder |
| View | Current scene view |
| RenderTargets | Render target slots (for depth write) |
| SceneTextures | Scene texture uniform buffer (for depth sampling in ray march) |
Definition at line 1941 of file IVSmokeRenderer.cpp.
| void FIVSmokeRenderer::SetCachedRenderData | ( | UWorld * | World, |
| FIVSmokePackedRenderData && | InRenderData | ||
| ) |
Set cached render data for a specific World. Called from Render Thread via ENQUEUE_RENDER_COMMAND.
| World | The world to set data for |
| InRenderData | The render data to cache |
Definition at line 230 of file IVSmokeRenderer.cpp.
| void FIVSmokeRenderer::SetServerTimeOffset | ( | UWorld * | World, |
| float | InServerTimeOffset | ||
| ) |
Set server time offset for smoke wind animation for a specific World.
Definition at line 220 of file IVSmokeRenderer.cpp.
| void FIVSmokeRenderer::Shutdown | ( | ) |
Release renderer resources.
Definition at line 67 of file IVSmokeRenderer.cpp.
|
staticconstexpr |
Maximum number of volumes supported for rendering.
Definition at line 323 of file IVSmokeRenderer.h.