Refactor draw calls and instancing logic to be more modular

This commit is contained in:
Wojtek Figat
2021-02-03 09:33:48 +01:00
parent 81cc8cf69c
commit a560b19cbc
23 changed files with 255 additions and 268 deletions

View File

@@ -178,7 +178,7 @@ void LightmapUVsDensityMaterialShader::Bind(BindParameters& params)
scaleZ > 0.00001f ? 1.0f / scaleZ : 0.0f);
data.LightmapTexelsPerWorldUnit = ShadowsOfMordor::LightmapTexelsPerWorldUnit;
data.LightmapSize = 1024.0f;
data.LightmapArea = drawCall.LightmapUVsArea;
data.LightmapArea = drawCall.Surface.LightmapUVsArea;
if (drawCallModel)
{
// Calculate current lightmap slot size for the object (matches the ShadowsOfMordor calculations when baking the lighting)