More fixes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user