Graphics: Move shadow-mapping related code to LightShadow classes
This commit is contained in:
committed by
Jérôme Leclercq
parent
ec3bc45544
commit
1768f20365
@@ -6,6 +6,7 @@
|
||||
#include <Nazara/Graphics/Enums.hpp>
|
||||
#include <Nazara/Graphics/Graphics.hpp>
|
||||
#include <Nazara/Graphics/PredefinedShaderStructs.hpp>
|
||||
#include <Nazara/Graphics/SpotLightShadowData.hpp>
|
||||
#include <Nazara/Math/Vector2.hpp>
|
||||
#include <Nazara/Math/Vector3.hpp>
|
||||
#include <Nazara/Math/Vector4.hpp>
|
||||
@@ -33,6 +34,11 @@ namespace Nz
|
||||
AccessByOffset<Matrix4f&>(data, lightOffset.lightMemberOffsets.viewProjMatrix) = m_viewProjMatrix;
|
||||
}
|
||||
|
||||
std::unique_ptr<LightShadowData> SpotLight::InstanciateShadowData(FramePipeline& pipeline, ElementRendererRegistry& elementRegistry) const
|
||||
{
|
||||
return std::make_unique<SpotLightShadowData>(pipeline, elementRegistry, *this);
|
||||
}
|
||||
|
||||
void SpotLight::UpdateTransform(const Vector3f& position, const Quaternionf& rotation, const Vector3f& /*scale*/)
|
||||
{
|
||||
m_position = position; //< don't call UpdatePosition to prevent double update
|
||||
|
||||
Reference in New Issue
Block a user