Graphics: Implement point-light shadow-mapping

This commit is contained in:
SirLynix
2022-12-03 17:16:30 +01:00
committed by Jérôme Leclercq
parent 6731e07b54
commit f8238a6e6c
17 changed files with 333 additions and 62 deletions

View File

@@ -14,10 +14,10 @@ namespace Nz
{
SpotLightShadowData::SpotLightShadowData(FramePipeline& pipeline, ElementRendererRegistry& elementRegistry, const SpotLight& light) :
m_pipeline(pipeline),
m_light(light),
m_viewer(Recti(0, 0, 1, 1), 0xFFFFFFFF)
m_light(light)
{
UInt32 shadowMapSize = light.GetShadowMapSize();
m_viewer.UpdateRenderMask(0xFFFFFFFF);
m_viewer.UpdateViewport(Recti(0, 0, SafeCast<int>(shadowMapSize), SafeCast<int>(shadowMapSize)));
ViewerInstance& viewerInstance = m_viewer.GetViewerInstance();