Add draw call sorting keys generation during draw calls collection (async)

This commit is contained in:
Wojtek Figat
2022-11-16 09:20:56 +01:00
parent eb281a7574
commit 3b4d91924f
9 changed files with 62 additions and 36 deletions

View File

@@ -123,7 +123,7 @@ void TerrainChunk::Draw(const RenderContext& renderContext) const
// Submit draw call
auto drawModes = (DrawPass)(_patch->_terrain->DrawModes & renderContext.View.Pass & (uint32)drawCall.Material->GetDrawModes());
if (drawModes != DrawPass::None)
renderContext.List->AddDrawCall(drawModes, flags, drawCall, true);
renderContext.List->AddDrawCall(renderContext, drawModes, flags, drawCall, true);
}
void TerrainChunk::Draw(const RenderContext& renderContext, MaterialBase* material, int32 lodIndex) const
@@ -179,7 +179,7 @@ void TerrainChunk::Draw(const RenderContext& renderContext, MaterialBase* materi
// Submit draw call
auto drawModes = (DrawPass)(_patch->_terrain->DrawModes & renderContext.View.Pass & (uint32)drawCall.Material->GetDrawModes());
if (drawModes != DrawPass::None)
renderContext.List->AddDrawCall(drawModes, flags, drawCall, true);
renderContext.List->AddDrawCall(renderContext, drawModes, flags, drawCall, true);
}
bool TerrainChunk::Intersects(const Ray& ray, Real& distance)