Graphics: Move shadow-mapping related code to LightShadow classes

This commit is contained in:
SirLynix
2022-11-26 18:33:12 +01:00
committed by Jérôme Leclercq
parent ec3bc45544
commit 1768f20365
27 changed files with 496 additions and 160 deletions

View File

@@ -378,7 +378,7 @@ namespace Nz
return;
const auto& lightEntry = light->GetLightEntry(lightIndex);
lightEntity->lightIndices[lightIndex] = m_pipeline->RegisterLight(lightEntry.light, lightEntry.renderMask);
lightEntity->lightIndices[lightIndex] = m_pipeline->RegisterLight(lightEntry.light.get(), lightEntry.renderMask);
});
lightEntity->onLightDetach.Connect(entityLight.OnLightDetach, [this, lightEntity](LightComponent* light, std::size_t lightIndex)
@@ -413,7 +413,7 @@ namespace Nz
if (!lightEntry.light)
continue;
lightEntity->lightIndices[lightIndex] = m_pipeline->RegisterLight(lightEntry.light, lightEntry.renderMask);
lightEntity->lightIndices[lightIndex] = m_pipeline->RegisterLight(lightEntry.light.get(), lightEntry.renderMask);
}
}
@@ -515,7 +515,7 @@ namespace Nz
if (!lightEntry.light)
continue;
lightEntity->lightIndices[renderableIndex] = m_pipeline->RegisterLight(lightEntry.light, lightEntry.renderMask);
lightEntity->lightIndices[renderableIndex] = m_pipeline->RegisterLight(lightEntry.light.get(), lightEntry.renderMask);
}
}
m_newlyVisibleGfxEntities.clear();