Fix quad overdraw debug drawing regression
This commit is contained in:
@@ -60,11 +60,12 @@ void QuadOverdrawPass::Render(RenderContext& renderContext, GPUContext* context,
|
|||||||
if (boxModel && boxModel->CanBeRendered() && defaultMaterial && defaultMaterial->IsReady())
|
if (boxModel && boxModel->CanBeRendered() && defaultMaterial && defaultMaterial->IsReady())
|
||||||
{
|
{
|
||||||
// Draw decals
|
// Draw decals
|
||||||
for (int32 i = 0; i < renderContext.List->Decals.Count(); i++)
|
PROFILE_GPU_CPU_NAMED("Decals");
|
||||||
|
for (const RenderDecalData& decal : renderContext.List->Decals)
|
||||||
{
|
{
|
||||||
const RenderDecalData& decal = renderContext.List->Decals.Get()[i];
|
|
||||||
drawCall.World = decal.World;
|
drawCall.World = decal.World;
|
||||||
defaultMaterial->Bind(bindParams);
|
defaultMaterial->Bind(bindParams);
|
||||||
|
bindParams.BindDrawData();
|
||||||
boxModel->Render(context);
|
boxModel->Render(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,6 +75,7 @@ void QuadOverdrawPass::Render(RenderContext& renderContext, GPUContext* context,
|
|||||||
if (renderContext.List->Sky && skyModel && skyModel->CanBeRendered() && skyMaterial && skyMaterial->IsReady())
|
if (renderContext.List->Sky && skyModel && skyModel->CanBeRendered() && skyMaterial && skyMaterial->IsReady())
|
||||||
{
|
{
|
||||||
// Draw sky
|
// Draw sky
|
||||||
|
PROFILE_GPU_CPU_NAMED("Sky");
|
||||||
auto box = skyModel->GetBox();
|
auto box = skyModel->GetBox();
|
||||||
Matrix m1, m2;
|
Matrix m1, m2;
|
||||||
Matrix::Scaling(renderContext.View.Far / ((float)box.GetSize().Y * 0.5f) * 0.95f, m1);
|
Matrix::Scaling(renderContext.View.Far / ((float)box.GetSize().Y * 0.5f) * 0.95f, m1);
|
||||||
@@ -81,6 +83,7 @@ void QuadOverdrawPass::Render(RenderContext& renderContext, GPUContext* context,
|
|||||||
m1 *= m2;
|
m1 *= m2;
|
||||||
drawCall.World = m1;
|
drawCall.World = m1;
|
||||||
drawCall.ObjectPosition = drawCall.World.GetTranslation();
|
drawCall.ObjectPosition = drawCall.World.GetTranslation();
|
||||||
|
bindParams.BindDrawData();
|
||||||
skyMaterial->Bind(bindParams);
|
skyMaterial->Bind(bindParams);
|
||||||
skyModel->Render(context);
|
skyModel->Render(context);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user