CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ShadowRenderer Class Reference

A shadow renderer. Used to render the depth map for the shadow maps. More...

#include <CeresEngine/Renderer/Rendering/ShadowRenderer.hpp>

Public Member Functions

 ShadowRenderer (Renderer &renderer, GPUDevice &device)
 Creates a new instance of the ShadowRenderer.
 
GPUImagePtr render (GPUCommandBuffer &commandBuffer, RendererLight &light)
 Renders the shadow map for the given light and returns a pointer to shadow map image object.
 

Protected Member Functions

GPUImagePtr renderPoint (GPUCommandBuffer &commandBuffer, RendererLight &light)
 Renders the shadow map for a point light.
 
GPUImagePtr renderSpot (GPUCommandBuffer &commandBuffer, RendererLight &light)
 Renders the shadow map for a spot light.
 
GPUImagePtr renderDirectional (GPUCommandBuffer &commandBuffer, RendererLight &light)
 Renders the shadow map for a directional light.
 

Private Types

using GraphicsPipelineGetter = std::function< GPUGraphicsPipelinePtr(const VertexDeclaration &)>
 

Private Member Functions

void drawScene (GPUCommandBuffer &commandBuffer, RendererScene &scene, const ConvexVolume &lightFrustum, const RendererGraphicsPipeline &rendererGraphicsPipeline, const RendererShaderSpecialization &shaderSpecialization, const GPUUniformBuffer &lightUniform)
 

Private Attributes

RenderermRenderer
 The renderer that owns this shadow renderer.
 
GPURenderPassPtr mRenderPass
 The GPU shadow render pass.
 
RendererGraphicsPipelinePtr mDepthPipeline
 The graphics pipeline for shadow mapping lights.
 

Detailed Description

A shadow renderer. Used to render the depth map for the shadow maps.

Member Typedef Documentation

◆ GraphicsPipelineGetter

Constructor & Destructor Documentation

◆ ShadowRenderer()

CeresEngine::ShadowRenderer::ShadowRenderer ( Renderer renderer,
GPUDevice device 
)
explicit

Creates a new instance of the ShadowRenderer.

Member Function Documentation

◆ drawScene()

void CeresEngine::ShadowRenderer::drawScene ( GPUCommandBuffer commandBuffer,
RendererScene scene,
const ConvexVolume &  lightFrustum,
const RendererGraphicsPipeline rendererGraphicsPipeline,
const RendererShaderSpecialization shaderSpecialization,
const GPUUniformBuffer lightUniform 
)
private

◆ render()

GPUImagePtr CeresEngine::ShadowRenderer::render ( GPUCommandBuffer commandBuffer,
RendererLight light 
)

Renders the shadow map for the given light and returns a pointer to shadow map image object.

Parameters
commandBufferThe command buffer to submit drawing commands.
lightThe light to render a shadow map for.
Returns
The shadow map image object.

◆ renderDirectional()

GPUImagePtr CeresEngine::ShadowRenderer::renderDirectional ( GPUCommandBuffer commandBuffer,
RendererLight light 
)
protected

Renders the shadow map for a directional light.

◆ renderPoint()

GPUImagePtr CeresEngine::ShadowRenderer::renderPoint ( GPUCommandBuffer commandBuffer,
RendererLight light 
)
protected

Renders the shadow map for a point light.

◆ renderSpot()

GPUImagePtr CeresEngine::ShadowRenderer::renderSpot ( GPUCommandBuffer commandBuffer,
RendererLight light 
)
protected

Renders the shadow map for a spot light.

Member Data Documentation

◆ mDepthPipeline

RendererGraphicsPipelinePtr CeresEngine::ShadowRenderer::mDepthPipeline
private

The graphics pipeline for shadow mapping lights.

◆ mRenderer

Renderer& CeresEngine::ShadowRenderer::mRenderer
private

The renderer that owns this shadow renderer.

◆ mRenderPass

GPURenderPassPtr CeresEngine::ShadowRenderer::mRenderPass
private

The GPU shadow render pass.


The documentation for this class was generated from the following file: