diff --git a/Packages/com.deltation.toon-rp/Runtime/Shadows/Blobs/Bounds2D.cs b/Packages/com.deltation.toon-rp/Runtime/Shadows/Blobs/Bounds2D.cs index b4372fbe..71b25333 100644 --- a/Packages/com.deltation.toon-rp/Runtime/Shadows/Blobs/Bounds2D.cs +++ b/Packages/com.deltation.toon-rp/Runtime/Shadows/Blobs/Bounds2D.cs @@ -65,12 +65,14 @@ public void Encapsulate(float2 point) public static class Bounds2DExtensions { + private const float IntersectionSizeTolerance = 0.001f; + [BurstCompile] public static bool Intersects(this in Bounds2D bounds, in Bounds2D otherBounds) { float2 intersectionMin = max(bounds.Min, otherBounds.Min); float2 intersectionMax = min(bounds.Max, otherBounds.Max); - return all(intersectionMax - intersectionMin >= 0.001f); + return all(intersectionMax - intersectionMin >= IntersectionSizeTolerance); } } } \ No newline at end of file diff --git a/Packages/com.deltation.toon-rp/Runtime/Shadows/Blobs/ToonBlobShadowsCulling.cs b/Packages/com.deltation.toon-rp/Runtime/Shadows/Blobs/ToonBlobShadowsCulling.cs index ae25fd5b..b1f6c2d0 100644 --- a/Packages/com.deltation.toon-rp/Runtime/Shadows/Blobs/ToonBlobShadowsCulling.cs +++ b/Packages/com.deltation.toon-rp/Runtime/Shadows/Blobs/ToonBlobShadowsCulling.cs @@ -13,7 +13,6 @@ public unsafe struct ToonBlobShadowsCullingJob : IJobParallelFor public NativeArray CullingGroups; [WriteOnly] [NativeDisableParallelForRestriction] public NativeArray SharedIndices; - [WriteOnly] public NativeArray SharedCounters; public Bounds2D ReceiverBounds;