![]() |
Lysa
0.0
Lysa 3D Engine
|
Render pass for generating shadow maps
Inheritance diagram for ShadowMapPass:Public Member Functions | |
| ShadowMapPass (const Light *light, const DeviceMemoryArray &meshInstancesDataArray, size_t maxMeshSurfacePerPipeline) | |
| void | compute (vireo::CommandList &commandList, const std::unordered_map< uint32, std::unique_ptr< GraphicPipelineData >> &pipelinesData) const |
| void | updatePipelines (const std::unordered_map< pipeline_id, std::vector< unique_id >> &pipelineIds) |
| void | setCurrentCamera (const Camera &camera) |
| void | update (uint32 frameIndex) override |
| void | render (vireo::CommandList &commandList, const SceneFrameData &scene) |
| auto | getShadowMapCount () const |
| auto | getShadowMap (const uint32 index) const |
| auto | getTransparencyColorMap (const uint32 index) const |
| const auto & | getLightSpace (const uint32 index) const |
| auto | getCascadeSplitDepth (const uint32 index) const |
Public Member Functions inherited from Renderpass | |
| Renderpass (const RendererConfiguration &config, const std::string &name) | |
| virtual void | resize (const vireo::Extent &extent, const std::shared_ptr< vireo::CommandList > &commandList) |
| virtual | ~Renderpass () = default |
| Renderpass (Renderpass &) = delete | |
| Renderpass & | operator= (Renderpass &) = delete |
Additional Inherited Members | |
Static Public Member Functions inherited from Renderpass | |
| static void | destroyShaderModules () |
Protected Member Functions inherited from Renderpass | |
| std::shared_ptr< vireo::ShaderModule > | loadShader (const std::string &shaderName) const |
| void | init (vireo::GraphicPipelineConfiguration &pipelineConfig, vireo::RenderingConfiguration &renderingConfig, const std::shared_ptr< vireo::DescriptorLayout > &descriptorLayout, bool withStencil) |
| void | init (vireo::GraphicPipelineConfiguration &pipelineConfig, vireo::RenderingConfiguration &renderingConfig, bool withStencil) const |
| void | initRendering (vireo::CommandList &commandList, const std::shared_ptr< vireo::Image > &image, const std::shared_ptr< vireo::GraphicPipeline > &pipeline, const std::shared_ptr< vireo::DescriptorSet > &sceneDescriptorSet, const std::shared_ptr< vireo::DescriptorSet > &descriptorSet) |
Protected Attributes inherited from Renderpass | |
| const std::string | name |
| const RendererConfiguration & | config |
Static Protected Attributes inherited from Renderpass | |
| static std::mutex | shaderModulesMutex |
| static std::unordered_map< std::string, std::shared_ptr< vireo::ShaderModule > > | shaderModules |
| ShadowMapPass | ( | const Light * | light, |
| const DeviceMemoryArray & | meshInstancesDataArray, | ||
| size_t | maxMeshSurfacePerPipeline | ||
| ) |
Constructs a ShadowMapPass
| light | Pointer to the light source for which shadows are generated |
| meshInstancesDataArray | Array of mesh instance data in device memory |
| maxMeshSurfacePerPipeline | Maximum number of mesh surfaces per pipeline |
| void compute | ( | vireo::CommandList & | commandList, |
| const std::unordered_map< uint32, std::unique_ptr< GraphicPipelineData >> & | pipelinesData | ||
| ) | const |
Computes frustum culling for shadow map generation
| commandList | The command list to record compute commands into |
| pipelinesData | Map of pipeline data for mesh rendering |
|
inline |
Gets the cascade split depth for a shadow map
| index | Index of the shadow map |
|
inline |
Gets the light space matrix for a shadow map
| index | Index of the shadow map |
|
inline |
Gets a shadow map render target
| index | Index of the shadow map |
|
inline |
Gets the number of shadow maps (subpasses)
|
inline |
Gets a transparency color map render target
| index | Index of the shadow map |
| void render | ( | vireo::CommandList & | commandList, |
| const SceneFrameData & | scene | ||
| ) |
Renders the shadow maps
| commandList | The command list to record rendering commands into |
| scene | The scene frame data |
|
inline |
Sets the current camera for cascaded shadow maps calculation
| camera | Reference to the current camera |
|
overridevirtual |
Update any per-frame state (default: no-op).
Reimplemented from lysa::Renderpass::update()
| void updatePipelines | ( | const std::unordered_map< pipeline_id, std::vector< unique_id >> & | pipelineIds | ) |
Updates the graphics pipelines based on active pipeline IDs
| pipelineIds | Map of pipeline IDs to unique object IDs |