More fixes

This commit is contained in:
Dynamitos
2024-02-23 12:50:40 +01:00
parent a3f5ad2841
commit 66b3ba59b6
8 changed files with 20 additions and 11 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ void taskMain(
{
uint m = mesh.meshletOffset + i;
MeshletDescription meshlet = pScene.meshletInfos[m];
if(meshlet.boundingBox.insideFrustum(localToClip, viewFrustum))
//if(meshlet.boundingBox.insideFrustum(localToClip, viewFrustum))
{
uint index;
InterlockedAdd(head, 1, index);
+3 -5
View File
@@ -20,13 +20,11 @@ struct AABB
for(int i = 0; i < 8; ++i)
{
float3 adjusted = corners[i].xyz / corners[i].w;
if(adjusted.z > 0)
if(frustum.pointInside(adjusted))
{
if(frustum.pointInside(adjusted))
{
return true;
}
return true;
}
}
return false;
}
+2 -2
View File
@@ -38,7 +38,7 @@ struct Plane
float d;
bool pointInside(float3 point)
{
return dot(n, point) - d > 0.0f;
return dot(n, point) - d < 0.0f;
}
};
@@ -49,7 +49,7 @@ struct Frustum
{
for(int p = 0; p < 4; ++p)
{
if(!sides[p].pointInside(point))
if(sides[p].pointInside(point))
{
return false;
}