4#include "game/node/SpatialNode.h"
5#include "math/GLMath.hpp"
6#include "shader/VulkanAlignmentConstants.hpp"
7#include "shader/general/resource/LightingShaderResourceManager.h"
8#include "misc/shapes/Sphere.h"
9#include "render/general/resource/shadow/ShadowMapHandle.h"
11#include "PointLightNode.generated.h"
13namespace ne RNAMESPACE() {
36 void setLightColor(
const glm::vec3& color);
43 void setLightIntensity(
float intensity);
50 void setLightDistance(
float distance);
57 glm::vec3 getLightColor()
const;
64 float getLightIntensity()
const;
71 float getLightDistance()
const;
84 std::pair<std::mutex, Sphere>* getShape();
94 virtual void onAfterDeserialized()
override;
108 virtual void onSpawning()
override;
119 virtual void onDespawning()
override;
130 virtual void onWorldLocationRotationScaleChanged()
override;
138 alignas(iVkVec4Alignment) glm::vec4 position = glm::vec4(0.0F, 0.0F, 0.0F, 1.0F);
141 alignas(iVkVec4Alignment) glm::vec4 color = glm::vec4(1.0F, 1.0F, 1.0F, 1.0F);
144 alignas(iVkScalarAlignment)
float intensity = 1.0F;
147 alignas(iVkScalarAlignment)
float distance = 1.0F;
150 alignas(iVkScalarAlignment)
unsigned int iShadowMapIndex = 0;
162 std::unique_ptr<ShaderLightArraySlot>
pSlot;
195 unsigned int getIndexIntoShadowPassInfoShaderArray(
size_t iCubemapFaceIndex = 0);
203 void* onStartedUpdatingShaderData();
209 void onFinishedUpdatingShaderData();
219 void* onStartedUpdatingShadowPassData(
size_t iCubemapFaceIndex);
225 void onFinishedUpdatingShadowPassData();
233 void markShaderDataToBeCopiedToGpu();
241 void markShadowPassDataToBeCopiedToGpu();
248 void onShadowMapArrayIndexChanged(
unsigned int iNewIndexIntoArray);
255 void recalculateShadowPassShaderData();
262 void recalculateShape();
283 glm::vec3 color = glm::vec3(1.0F, 1.0F, 1.0F);
287 float intensity = 1.0F;
291 float distance = 10.0F;
293 ne_PointLightNode_GENERATED
297File_PointLightNode_GENERATED
Definition: GuidProperty.h:30
Definition: PointLightNode.h:15
std::pair< std::recursive_mutex, ShaderData > mtxShaderData
Definition: PointLightNode.h:265
std::pair< std::mutex, Sphere > mtxShape
Definition: PointLightNode.h:272
std::unique_ptr< ShadowMapHandle > pShadowMapHandle
Definition: PointLightNode.h:279
Definition: Renderer.h:43
Definition: SerializeProperty.h:42
Definition: ShadowMapHandle.h:23
Definition: SpatialNode.h:12
Definition: PointLightNode.h:134
Definition: PointLightNode.h:158
ShadowPassLightShaderInfo shaderData
Definition: PointLightNode.h:165
std::unique_ptr< ShaderLightArraySlot > pSlot
Definition: PointLightNode.h:162
Definition: PointLightNode.h:154
std::unique_ptr< ShaderLightArraySlot > pPointLightArraySlot
Definition: PointLightNode.h:169
PointLightShaderData shaderData
Definition: PointLightNode.h:175
std::array< ShadowPassDataGroup, 6 > vShadowPassDataGroup
Definition: PointLightNode.h:172
Definition: LightingShaderResourceManager.h:38