Skip to content

Commit

Permalink
feat: remove pre and post z pass
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Pollind <[email protected]>
  • Loading branch information
pollend committed Jun 8, 2024
1 parent 5006a6d commit 66c43e0
Show file tree
Hide file tree
Showing 8 changed files with 998 additions and 96 deletions.
49 changes: 0 additions & 49 deletions HPL2/gpu.cfg

This file was deleted.

709 changes: 709 additions & 0 deletions HPL2/gpu.data

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion HPL2/include/graphics/Material.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ namespace hpl {

bool mbAutoDestroyTextures = true;
bool mbDepthTest = true;

};

};
15 changes: 15 additions & 0 deletions HPL2/include/graphics/RendererDeferred.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,21 @@ namespace hpl {
bool m_invert = false;
bool m_disableOcclusionQueries = false;
};

void cmdPreZ(
Cmd* cmd,
cWorld* apWorld,
const ForgeRenderer::Frame& frame,
cRenderList& renderList,
float frameTime,
RenderTarget* depthBuffer,
cFrustum* apFrustum,
uint32_t frameDescriptorIndex,
cMatrixf viewMat,
cMatrixf projectionMat,
AdditionalZPassOptions flags);


void cmdPreAndPostZ(
Cmd* cmd,
cWorld* apWorld,
Expand Down
1 change: 0 additions & 1 deletion HPL2/sources/graphics/Material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ namespace hpl {
}
case eMaterialUvAnimation_Rotate: {
cVector3f vDir = GetAxisVector(pAnim->mAxis);

cMatrixf mtxRot = cMath::MatrixRotate(vDir * pAnim->mfSpeed * mfAnimTime, eEulerRotationOrder_XYZ);
m_mtxUV = cMath::MatrixMul(m_mtxUV, mtxRot);
break;
Expand Down
7 changes: 0 additions & 7 deletions HPL2/sources/graphics/RenderList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,6 @@ namespace hpl {
return pMatA->GetAlphaMode() < pMatB->GetAlphaMode();
}

//////////////////////////
// If alpha, sort by texture (we know alpha is same for both materials, so can just test one)
//if (pMatA->GetAlphaMode() == eMaterialAlphaMode_Trans) {
// if (pMatA->GetImage(eMaterialTexture_Diffuse) != pMatB->GetImage(eMaterialTexture_Diffuse)) {
// return pMatA->GetImage(eMaterialTexture_Diffuse) < pMatB->GetImage(eMaterialTexture_Diffuse);
// }
//}

//////////////////////////
// View space depth, no need to test further since Z should almost never be the same for two objects.
Expand Down
Loading

0 comments on commit 66c43e0

Please sign in to comment.