Lighting is broken again

This commit is contained in:
Dynamitos committed 2024-02-20 21:07:17 +01:00
1 parent 97d96a6bc1
commit 2480529dbc
11 files changed
+52 -53

No files matched your search

+3 -3
View File
@@ -98,12 +98,12 @@ void cullLights(ComputeShaderInput in)
for ( uint i = in.groupIndex; i < pLightEnv.numPointLights; i += BLOCK_SIZE * BLOCK_SIZE )
{
PointLight light = pLightEnv.pointLights[i];
light.updatePosition();
float3 lightClip = light.getClipPosition();
//TODO: why doesn't this check go through?
if(light.insideFrustum(groupFrustum, nearClipVS, maxDepthVS))
if(light.insideFrustum(groupFrustum, lightClip, nearClipVS, maxDepthVS))
{
tAppendLight(i);
if(!light.insidePlane(minPlane))
if(!light.insidePlane(minPlane, lightClip))
{
oAppendLight(i);
}