trying to fix light culling still

This commit is contained in:
Dynamitos
2021-07-11 22:23:01 +02:00
parent 7f019a28b4
commit bc09920462
5 changed files with 22 additions and 8 deletions
+2 -2
View File
@@ -105,10 +105,10 @@ void cullLights(ComputeShaderInput in)
for ( uint i = in.groupIndex; i < numPointLights; i += BLOCK_SIZE * BLOCK_SIZE )
{
PointLight light = pointLights[i];
//if(light.insideFrustum(groupFrustum, nearClipVS, maxDepthVS))
if(light.insideFrustum(groupFrustum, nearClipVS, maxDepthVS))
{
tAppendLight(i);
//if(!light.insidePlane(minPlane))
if(!light.insidePlane(minPlane))
{
oAppendLight(i);
}
+2 -2
View File
@@ -43,9 +43,9 @@ struct PointLight : ILightEnv
{
bool result = true;
//if(positionVS.z - range > zNear || positionVS.z + colorRange.w < zFar)
if(positionVS.z - colorRange.w > zNear || positionVS.z + colorRange.w < zFar)
{
// result = false;
result = false;
}
for(int i = 0; i < 4 && result; ++i)
{