Trying to fix mesh culling

This commit is contained in:
Dynamitos
2024-05-04 13:25:19 +02:00
parent f0fd9a7ae7
commit 87b72dcd84
8 changed files with 53 additions and 51 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ void taskMain(
{
head = 0;
float3 origin = float3(0, 0, 0);
const float offset = 0.0f;
const float offset = 600.0f;
float3 corners[4] = {
screenToModel(instance.inverseTransformMatrix, float4(offset, offset, -1.0f, 1.0f)).xyz,
screenToModel(instance.inverseTransformMatrix, float4(pViewParams.screenDimensions.x - offset, offset, -1.0f, 1.0f)).xyz,
@@ -46,7 +46,7 @@ void taskMain(
{
uint m = mesh.meshletOffset + i;
MeshletDescription meshlet = pScene.meshletInfos[m];
//if(meshlet.bounding.insideFrustum(viewFrustum))
if(meshlet.bounding.insideFrustum(viewFrustum))
{
uint index;
InterlockedAdd(head, 1, index);