Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
DirectionalLightComponent.hpp
1#pragma once
2
3#include "EngineCore/Reflection/ComponentReflection.hpp"
4#include "EngineCore/ECS/Entity.hpp"
5#include "Common/Math.hpp"
6
7namespace Grindstone {
8 class WorldContextSet;
9
10 namespace GraphicsAPI {
11 class Buffer;
12 class DescriptorSet;
14 class RenderPass;
15 class Framebuffer;
16 class Image;
17 }
18
21 Math::Matrix4 shadowMatrix;
22 Math::Float3 color;
23 float sourceRadius;
24 Math::Float3 direction;
25 float intensity;
26 float shadowResolution;
27 };
28
29 Math::Matrix4 shadowMatrix;
30 Math::Float3 color;
31 float sourceRadius = 0.0f;
32 float intensity = 0.0f;
33 uint32_t shadowResolution = 0u;
34 uint32_t cachedShadowResolution = 0u;
35
36 GraphicsAPI::RenderPass* renderPass = nullptr;
37 GraphicsAPI::Framebuffer* framebuffer = nullptr;
38 GraphicsAPI::Image* depthTarget = nullptr;
39
40 GraphicsAPI::Buffer* uniformBufferObject = nullptr;
41 GraphicsAPI::DescriptorSet* descriptorSet = nullptr;
42 GraphicsAPI::DescriptorSetLayout* descriptorSetLayout = nullptr;
43
44 GraphicsAPI::Buffer* shadowMapUniformBufferObject = nullptr;
45 GraphicsAPI::DescriptorSet* shadowMapDescriptorSet = nullptr;
46 GraphicsAPI::DescriptorSetLayout* shadowMapDescriptorSetLayout = nullptr;
47
48 REFLECT("DirectionalLight")
49 };
50
51 void SetupDirectionalLightComponent(Grindstone::WorldContextSet& cxtSet, entt::entity);
52 void DestroyDirectionalLightComponent(Grindstone::WorldContextSet& cxtSet, entt::entity);
53}
Definition Buffer.hpp:56
Definition DescriptorSetLayout.hpp:13
Definition DescriptorSet.hpp:15
Definition Framebuffer.hpp:16
Definition Image.hpp:48
Definition RenderPass.hpp:27
Definition WorldContextSet.hpp:11
Definition DirectionalLightComponent.hpp:20
Definition DirectionalLightComponent.hpp:19
Definition FloatVectors.cs:108