CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
ShadowRenderer.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
12
16
17namespace CeresEngine {
18
19 class Renderer;
20 class RendererCamera;
21 class RendererLight;
22
25 private:
28
31
34
35 public:
37 explicit ShadowRenderer(Renderer& renderer, GPUDevice& device);
38
39 public:
46
47 protected:
50
53
56
57 private:
59
60 void drawScene(GPUCommandBuffer& commandBuffer, RendererScene& scene, const ConvexVolume& lightFrustum,
61 const RendererGraphicsPipeline& rendererGraphicsPipeline, const RendererShaderSpecialization& shaderSpecialization, const GPUUniformBuffer& lightUniform);
62 };
63
64} // namespace CeresEngine
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition GPUCommandBuffer.hpp:77
Definition GPUDevice.hpp:357
Definition GPUBufferObject.hpp:221
A renderer graphics pipeline.
Definition RendererGraphicsPipeline.hpp:60
The CeresEngine renderer.
Definition Renderer.hpp:35
A class that represents a light inside the renderer.
Definition RendererLight.hpp:104
A class that represents a scene inside the renderer.
Definition RendererScene.hpp:34
A shadow renderer. Used to render the depth map for the shadow maps.
Definition ShadowRenderer.hpp:24
GPURenderPassPtr mRenderPass
The GPU shadow render pass.
Definition ShadowRenderer.hpp:30
GPUImagePtr renderPoint(GPUCommandBuffer &commandBuffer, RendererLight &light)
Renders the shadow map for a point light.
GPUImagePtr render(GPUCommandBuffer &commandBuffer, RendererLight &light)
Renders the shadow map for the given light and returns a pointer to shadow map image object.
ShadowRenderer(Renderer &renderer, GPUDevice &device)
Creates a new instance of the ShadowRenderer.
std::function< GPUGraphicsPipelinePtr(const VertexDeclaration &)> GraphicsPipelineGetter
Definition ShadowRenderer.hpp:58
RendererGraphicsPipelinePtr mDepthPipeline
The graphics pipeline for shadow mapping lights.
Definition ShadowRenderer.hpp:33
Renderer & mRenderer
The renderer that owns this shadow renderer.
Definition ShadowRenderer.hpp:27
GPUImagePtr renderDirectional(GPUCommandBuffer &commandBuffer, RendererLight &light)
Renders the shadow map for a directional light.
void drawScene(GPUCommandBuffer &commandBuffer, RendererScene &scene, const ConvexVolume &lightFrustum, const RendererGraphicsPipeline &rendererGraphicsPipeline, const RendererShaderSpecialization &shaderSpecialization, const GPUUniformBuffer &lightUniform)
GPUImagePtr renderSpot(GPUCommandBuffer &commandBuffer, RendererLight &light)
Renders the shadow map for a spot light.
Definition Application.hpp:19
RC< GPUGraphicsPipeline > GPUGraphicsPipelinePtr
Definition Forward.hpp:49
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A structure that describes a RendererGraphicsPipeline specialization.
Definition RendererShader.hpp:31
Determines how vertices are laid-out on a vertex buffer or a mesh data.
Definition VertexDeclaration.hpp:205