Cleanup some rendering code
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "Engine/Graphics/RenderBuffers.h"
|
||||
#include "Engine/Graphics/RenderTargetPool.h"
|
||||
#include "Engine/Renderer/RenderList.h"
|
||||
#include "Engine/Graphics/RenderTools.h"
|
||||
|
||||
void QuadOverdrawPass::Render(RenderContext& renderContext, GPUContext* context, GPUTextureView* lightBuffer)
|
||||
{
|
||||
@@ -82,7 +83,7 @@ void QuadOverdrawPass::Render(RenderContext& renderContext, GPUContext* context,
|
||||
m1 *= m2;
|
||||
drawCall.World = m1;
|
||||
drawCall.ObjectPosition = drawCall.World.GetTranslation();
|
||||
drawCall.WorldDeterminantSign = Math::FloatSelect(drawCall.World.RotDeterminant(), 1, -1);
|
||||
drawCall.WorldDeterminantSign = RenderTools::GetWorldDeterminantSign(drawCall.World);
|
||||
skyMaterial->Bind(bindParams);
|
||||
skyModel->Render(context);
|
||||
}
|
||||
|
||||
@@ -691,7 +691,6 @@ void RenderList::ExecuteDrawCalls(const RenderContext& renderContext, DrawCallsL
|
||||
// Prepare instance buffer
|
||||
if (useInstancing)
|
||||
{
|
||||
PROFILE_CPU_NAMED("Build Instancing");
|
||||
int32 instancedBatchesCount = 0;
|
||||
for (int32 i = 0; i < list.Batches.Count(); i++)
|
||||
{
|
||||
@@ -707,6 +706,7 @@ void RenderList::ExecuteDrawCalls(const RenderContext& renderContext, DrawCallsL
|
||||
}
|
||||
if (instancedBatchesCount != 0)
|
||||
{
|
||||
PROFILE_CPU_NAMED("Build Instancing");
|
||||
_instanceBuffer.Clear();
|
||||
_instanceBuffer.Data.Resize(instancedBatchesCount * sizeof(InstanceData));
|
||||
auto instanceData = (InstanceData*)_instanceBuffer.Data.Get();
|
||||
|
||||
Reference in New Issue
Block a user