Hopefully fixed culling now

This commit is contained in:
Dynamitos
2024-08-31 13:29:33 +02:00
parent 88eacd067e
commit d7aefc07f3
7 changed files with 24 additions and 65 deletions
-2
View File
@@ -26,9 +26,7 @@ void taskMain(
uint cull = p.cullingOffset + i;
MeshletDescription meshlet = pScene.meshletInfos[m];
MeshletCullingInfo culling = pScene.cullingInfos[cull];
#ifdef DEPTH_CULLING
if(culling.wasVisible())
#endif
{
uint index;
InterlockedAdd(head, 1, index);
+1 -1
View File
@@ -70,7 +70,7 @@ struct AABB
int2 screenCoords = int2(clamp(int(screenCorner.x), 0, int(pViewParams.screenDimensions.x)), clamp(int(screenCorner.y), 0, int(pViewParams.screenDimensions.y)));
screenCornerMin = int2(min(screenCornerMin.x, screenCoords.x), min(screenCornerMin.y, screenCoords.y));
screenCornerMax = int2(max(screenCornerMax.x, screenCoords.x), max(screenCornerMax.y, screenCoords.y));
maxDepth = max(maxDepth, screenCorner.z);
maxDepth = max(maxDepth, 1/screenCorner.z);
}
return maxDepth;
}