Fix sort order usage in multi-pass drawing of the Mesh

This commit is contained in:
Wojtek Figat
2023-01-28 01:31:07 +01:00
parent adfe3ad165
commit 87549a3e6c
3 changed files with 2 additions and 4 deletions

View File

@@ -575,7 +575,7 @@ void Mesh::Draw(const RenderContextBatch& renderContextBatch, const DrawInfo& in
const auto shadowsMode = entry.ShadowsMode & slot.ShadowsMode; const auto shadowsMode = entry.ShadowsMode & slot.ShadowsMode;
const auto drawModes = info.DrawModes & material->GetDrawModes(); const auto drawModes = info.DrawModes & material->GetDrawModes();
if (drawModes != DrawPass::None) if (drawModes != DrawPass::None)
renderContextBatch.GetMainContext().List->AddDrawCall(renderContextBatch, drawModes, info.Flags, shadowsMode, info.Bounds, drawCall, entry.ReceiveDecals); renderContextBatch.GetMainContext().List->AddDrawCall(renderContextBatch, drawModes, info.Flags, shadowsMode, info.Bounds, drawCall, entry.ReceiveDecals, info.SortOrder);
} }
bool Mesh::DownloadDataGPU(MeshBufferType type, BytesContainer& result) const bool Mesh::DownloadDataGPU(MeshBufferType type, BytesContainer& result) const

View File

@@ -637,7 +637,7 @@ void RenderList::SortDrawCalls(const RenderContext& renderContext, bool reverseD
Sorting::QuickSort(list.Batches.Get(), list.Batches.Count()); Sorting::QuickSort(list.Batches.Get(), list.Batches.Count());
} }
bool CanUseInstancing(DrawPass pass) FORCE_INLINE bool CanUseInstancing(DrawPass pass)
{ {
return pass == DrawPass::GBuffer || pass == DrawPass::Depth; return pass == DrawPass::GBuffer || pass == DrawPass::Depth;
} }

View File

@@ -871,9 +871,7 @@ ScriptingTypeHandle ManagedBinaryModule::FindType(MonoClass* klass)
{ {
int32 typeIndex; int32 typeIndex;
if (typeModule->ClassToTypeIndex.TryGet(klass, typeIndex)) if (typeModule->ClassToTypeIndex.TryGet(klass, typeIndex))
{
return ScriptingTypeHandle(typeModule, typeIndex); return ScriptingTypeHandle(typeModule, typeIndex);
}
} }
return ScriptingTypeHandle(); return ScriptingTypeHandle();
} }