Lighting is broken again

This commit is contained in:
Dynamitos
2024-02-20 21:07:17 +01:00
parent 97d96a6bc1
commit 2480529dbc
11 changed files with 52 additions and 53 deletions
+6 -2
View File
@@ -19,9 +19,13 @@ struct AABB
corners[7] = mul(transform, float4(max.x, max.y, max.z, 1.0f));
for(int i = 0; i < 8; ++i)
{
if(frustum.pointInside(corners[i].xyz / corners[i].w))
float3 adjusted = corners[i].xyz / corners[i].w;
if(adjusted.z > 0)
{
return true;
if(frustum.pointInside(adjusted))
{
return true;
}
}
}
return false;