diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Lights/SHLightComponent.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Lights/SHLightComponent.cpp index 39bfccd9..e8d7b6f7 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Lights/SHLightComponent.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Lights/SHLightComponent.cpp @@ -47,7 +47,7 @@ namespace SHADE MakeDirty(); } - void SHLightComponent::ModifyLayer(uint8_t layerIndex, bool value) noexcept + void SHLightComponent::ModifyCullingMask(uint8_t layerIndex, bool value) noexcept { if (value) lightData.cullingMask |= (1u << layerIndex); @@ -58,6 +58,11 @@ namespace SHADE } + void SHLightComponent::SetCullingMask(uint32_t value) noexcept + { + lightData.cullingMask = value; + } + void SHLightComponent::SetAllLayers(void) noexcept { lightData.cullingMask = std::numeric_limits::max(); diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Lights/SHLightComponent.h b/SHADE_Engine/src/Graphics/MiddleEnd/Lights/SHLightComponent.h index 45c205c2..951e6071 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Lights/SHLightComponent.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Lights/SHLightComponent.h @@ -35,19 +35,20 @@ namespace SHADE /*-----------------------------------------------------------------------*/ /* SETTERS AND GETTERS */ /*-----------------------------------------------------------------------*/ - void SetPosition (SHVec3 position) noexcept; // serialized - void SetType (SH_LIGHT_TYPE type) noexcept; // serialized - void SetDirection (SHVec3 direction) noexcept; // serialized - void SetColor (SHVec4 color) noexcept; // serialized - void ModifyLayer (uint8_t layerIndex, bool value) noexcept; // serialized - void SetAllLayers (void) noexcept; // serialized - void ClearAllLayers (void) noexcept; // serialized - void MakeDirty (void) noexcept; - void ClearDirtyFlag (void) noexcept; - void Unbind (void) noexcept; - void SetBound (uint32_t inIndexInBuffer) noexcept; - void SetActive (bool flag) noexcept; // serialized - void SetStrength (float value) noexcept; // serialized + void SetPosition (SHVec3 position) noexcept; // serialized + void SetType (SH_LIGHT_TYPE type) noexcept; // serialized + void SetDirection (SHVec3 direction) noexcept; // serialized + void SetColor (SHVec4 color) noexcept; // serialized + void ModifyCullingMask (uint8_t layerIndex, bool value) noexcept; // serialized + void SetCullingMask (uint32_t value) noexcept; + void SetAllLayers (void) noexcept; // serialized + void ClearAllLayers (void) noexcept; // serialized + void MakeDirty (void) noexcept; + void ClearDirtyFlag (void) noexcept; + void Unbind (void) noexcept; + void SetBound (uint32_t inIndexInBuffer) noexcept; + void SetActive (bool flag) noexcept; // serialized + void SetStrength (float value) noexcept; // serialized SHLightData const& GetLightData (void) const noexcept;