Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
SpotLightComponent.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 DescriptorSet;
12 class RenderPass;
13 class Image;
14 class Framebuffer;
15 class Buffer;
17 }
18
21 Math::Matrix4 shadowMatrix;
22 Math::Float3 color;
23 float attenuationRadius;
24 Math::Float3 position;
25 float intensity;
26 Math::Float3 direction;
27 float innerAngle;
28 float outerAngle;
29 float shadowResolution;
30 };
31
32 Math::Matrix4 shadowMatrix;
33 Math::Float3 color;
34 float attenuationRadius = 0.0f;
35 float intensity = 0.0f;
36 float innerAngle = 0.0f;
37 float outerAngle = 0.0f;
38 uint32_t shadowResolution = 0u;
39 uint32_t cachedShadowResolution = 0u;
40
41 GraphicsAPI::RenderPass* renderPass = nullptr;
42 GraphicsAPI::Framebuffer* framebuffer = nullptr;
43 GraphicsAPI::Image* depthTarget = nullptr;
44
45 GraphicsAPI::Buffer* uniformBufferObject = nullptr;
46 GraphicsAPI::DescriptorSet* descriptorSet = nullptr;
47 GraphicsAPI::DescriptorSetLayout* descriptorSetLayout = nullptr;
48
49 GraphicsAPI::Buffer* shadowMapUniformBufferObject = nullptr;
50 GraphicsAPI::DescriptorSet* shadowMapDescriptorSet = nullptr;
51 GraphicsAPI::DescriptorSetLayout* shadowMapDescriptorSetLayout = nullptr;
52
53 REFLECT("SpotLight")
54 };
55
56 void SetupSpotLightComponent(Grindstone::WorldContextSet& cxtSet, entt::entity);
57 void DestroySpotLightComponent(Grindstone::WorldContextSet& cxtSet, entt::entity);
58}
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 FloatVectors.cs:108
Definition SpotLightComponent.hpp:20
Definition SpotLightComponent.hpp:19