Class ShadowsPass
Shadows rendering service.
Assembly: FlaxEngine.dll
File: Engine/Renderer/ShadowsPass.h
Syntax
public class ShadowsPass : public RendererPass
Methods
Dispose()
Cleanup service data.
Declaration
public virtual void Dispose() override
Overrides
GetShadowAtlas(const RenderBuffers* renderBuffers, GPUTexture*& shadowMapAtlas, GPUBufferView*& shadowsBuffer)
Gets the shadow atlas texture and shadows buffer for shadow projection in shaders.
Declaration
public static void GetShadowAtlas(const RenderBuffers* renderBuffers, GPUTexture*& shadowMapAtlas, GPUBufferView*& shadowsBuffer)
Parameters
Render The render buffers that store frame context. |
GPUTexture
shadowMapAtlas
The output shadow map atlas texture or null if unused. |
GPUBuffer The output shadows buffer or null if unused. |
Init()
Initialize service.
Declaration
public virtual bool Init() override
Returns
bool
|
Overrides
RenderShadowMaps(RenderContextBatch& renderContextBatch)
Renders the shadow maps for all lights (into atlas).
Declaration
public void RenderShadowMaps(RenderContextBatch& renderContextBatch)
Parameters
Render
|
RenderShadowMask(RenderContextBatch& renderContextBatch, RenderLightData& light, GPUTextureView* shadowMask)
Renders the shadow mask for the given light.
Declaration
public void RenderShadowMask(RenderContextBatch& renderContextBatch, RenderLightData& light, GPUTextureView* shadowMask)
Parameters
Render The rendering context batch. |
Render The light. |
GPUTexture The shadow mask (output). |
setupResources()
Declaration
protected virtual bool setupResources() override
Returns
bool
|
Overrides
SetupShadows(RenderContext& renderContext, RenderContextBatch& renderContextBatch)
Setups the shadows rendering for batched scene drawing. Checks which lights will cast a shadow.
Declaration
public void SetupShadows(RenderContext& renderContext, RenderContextBatch& renderContextBatch)
Parameters
Render
|
Render
|
ToString()
Gets the string representation of this object.
Declaration
public virtual String ToString() const override