4#include "game/nodes/SpatialNode.h"
5#include "math/GLMath.hpp"
6#include "shader/VulkanAlignmentConstants.hpp"
7#include "shader/general/resource/LightingShaderResourceManager.h"
8#include "render/general/resource/shadow/ShadowMapHandle.h"
10#include "DirectionalLightNode.generated.h"
12namespace ne RNAMESPACE() {
35 void setLightColor(
const glm::vec3& color);
42 void setLightIntensity(
float intensity);
49 glm::vec3 getLightColor()
const;
56 float getLightIntensity()
const;
66 virtual void onAfterDeserialized()
override;
80 virtual void onSpawning()
override;
91 virtual void onDespawning()
override;
102 virtual void onWorldLocationRotationScaleChanged()
override;
113 alignas(iVkMat4Alignment) glm::mat4 viewProjectionMatrix = glm::identity<glm::mat4>();
116 alignas(iVkVec4Alignment) glm::vec4 direction = glm::vec4(0.0F, 0.0F, 0.0F, 0.0F);
119 alignas(iVkVec4Alignment) glm::vec4 color = glm::vec4(1.0F, 1.0F, 1.0F, 1.0F);
122 alignas(iVkScalarAlignment)
float intensity = 1.0F;
125 alignas(iVkScalarAlignment)
unsigned int iShadowMapIndex = 0;
137 std::unique_ptr<ShaderLightArraySlot>
pSlot;
168 unsigned int getIndexIntoShadowPassInfoShaderArray();
176 void* onStartedUpdatingShaderData();
182 void onFinishedUpdatingShaderData();
190 void* onStartedUpdatingShadowPassData();
196 void onFinishedUpdatingShadowPassData();
204 void markShadowPassDataToBeCopiedToGpu();
212 void markShaderDataToBeCopiedToGpu();
219 void onShadowMapArrayIndexChanged(
unsigned int iNewIndexIntoArray);
226 void recalculateShadowMappingShaderData();
240 glm::vec3 color = glm::vec3(1.0F, 1.0F, 1.0F);
244 float intensity = 1.0F;
246 ne_DirectionalLightNode_GENERATED
250File_DirectionalLightNode_GENERATED
Definition: DirectionalLightNode.h:14
std::pair< std::recursive_mutex, ShaderData > mtxShaderData
Definition: DirectionalLightNode.h:229
std::unique_ptr< ShadowMapHandle > pShadowMapHandle
Definition: DirectionalLightNode.h:236
Definition: GuidProperty.h:30
Definition: Renderer.h:43
Definition: SerializeProperty.h:42
Definition: ShadowMapHandle.h:23
Definition: SpatialNode.h:12
Definition: DirectionalLightNode.h:106
Definition: DirectionalLightNode.h:133
std::unique_ptr< ShaderLightArraySlot > pSlot
Definition: DirectionalLightNode.h:137
ShadowPassLightShaderInfo shaderData
Definition: DirectionalLightNode.h:140
Definition: DirectionalLightNode.h:129
std::unique_ptr< ShaderLightArraySlot > pDirectionalLightArraySlot
Definition: DirectionalLightNode.h:144
ShadowPassDataGroup shadowPassData
Definition: DirectionalLightNode.h:147
DirecionalLightShaderData shaderData
Definition: DirectionalLightNode.h:150
Definition: LightingShaderResourceManager.h:38