Refactor scene rendering to use batched culling for main view and shadow projections

This commit is contained in:
Wojtek Figat
2022-10-28 09:13:28 +02:00
parent e217d5e79b
commit eb52d333ae
44 changed files with 1064 additions and 514 deletions

View File

@@ -102,7 +102,7 @@ public:
{
for (int32 i = 0; i < Meshes.Count(); i++)
{
Meshes[i].Render(context);
Meshes.Get()[i].Render(context);
}
}
@@ -116,7 +116,21 @@ public:
{
for (int32 i = 0; i < Meshes.Count(); i++)
{
Meshes[i].Draw(renderContext, info, lodDitherFactor);
Meshes.Get()[i].Draw(renderContext, info, lodDitherFactor);
}
}
/// <summary>
/// Draws all the meshes from the model LOD.
/// </summary>
/// <param name="renderContextBatch">The rendering context batch.</param>
/// <param name="info">The packed drawing info data.</param>
/// <param name="lodDitherFactor">The LOD transition dither factor.</param>
FORCE_INLINE void Draw(const RenderContextBatch& renderContextBatch, const SkinnedMesh::DrawInfo& info, float lodDitherFactor) const
{
for (int32 i = 0; i < Meshes.Count(); i++)
{
Meshes.Get()[i].Draw(renderContextBatch, info, lodDitherFactor);
}
}
};