Skip to content

Commit 8f0ff3b

Browse files
committed
I don't like that but there's no other way
1 parent 2c981b5 commit 8f0ff3b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Snooper/Rendering/Systems/ClusteredLightSystem.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ public void Resize(int newWidth, int newHeight)
256256
GridDimensionY = (_screenHeight + TileSize - 1) / TileSize;
257257
_numClusters = GridDimensionX * GridDimensionY * GridDimensionZ;
258258
_numWorkGroups = (_numClusters + WorkGroupSize - 1) / WorkGroupSize;
259+
if (!HasClusters) return;
259260

260261
_clusterAABBBuffer.Reallocate(_numClusters);
261262
_clusterDataBuffer.Reallocate(_numClusters);

0 commit comments

Comments
 (0)