trying to fix light culling still
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user