Graphics: Send shadow map res to shader

This commit is contained in:
SirLynix
2022-11-20 16:26:11 +01:00
committed by Jérôme Leclercq
parent 3623f4ccc4
commit f580ba523d
8 changed files with 17 additions and 26 deletions

View File

@@ -23,7 +23,7 @@ namespace Nz
std::size_t parameter1;
std::size_t parameter2;
std::size_t parameter3;
std::size_t shadowMappingFlag;
std::size_t shadowMapSize;
std::size_t viewProjMatrix;
};

View File

@@ -170,7 +170,7 @@ namespace Nz
0.0f, 0.0f, 1.0f, 0.0f,
0.5f, 0.5f, 0.0f, 1.0f);
Matrix4f projection = Matrix4f::Perspective(m_outerAngle * 2.f, 1.f, 1.f, m_radius);
Matrix4f projection = Matrix4f::Perspective(m_outerAngle * 2.f, 1.f, 0.01f, m_radius);
Matrix4f view = Matrix4f::TransformInverse(m_position, m_rotation);
m_viewProjMatrix = view * projection * biasMatrix;