Steps to reproduce:
1. Create new Unity project using Universal 2D Template
2. Go to Project Settings > Graphics > 2D Shadow Geometry to "Enhanced".
3. Import provided “URP2DPathologicalShapeSource.cs” and “URP2DPathologicalShapeProvider.cs” scripts to the project
4. Create an empty GameObject with no Renderer on it
5. On empty GameObject add Component > URP 2D Shadow Repro > Pathological Shape Source, and set Mode = DegenerateSubShape
6. On empty GameObject add Component > Shadow Caster 2D and make sure its Casting Source is set to "Pathological Repro Shape".
7. Select Global Light 2D GameObject with Shadows enabled and observe the Console
Actual results:
Mesh upload throws and the caster ends up with no mesh at all, so it casts no shadow:
ArgumentException: Index buffer element #211 (value 4294967295) is out of bounds; mesh only has 142 vertices.
at UnityEngine.Mesh.SetIndexBufferData[T] ...
at UnityEngine.Rendering.Universal.SoftShadowGeometryGenerator.UploadMesh (SoftShadowGeometryGenerator.cs:651)
at UnityEngine.Rendering.Universal.ShadowMesh2D.get_mesh (ShadowMesh2D.cs:95)
at UnityEngine.Rendering.Universal.ShadowCaster2D.get_mesh (ShadowCaster2D.cs:135)
Expected results: A sub-shape too small to contribute geometry is skipped without affecting the rest of the outline: the square still casts its shadow and nothing is logged
Reproducible with versions: 6000.7.0b1, 7000.0.0a1
Can’t test with versions: 6000.0.84f1, 6000.3.24f1, 6000.5.11f1, 6000.6.2f1, 6000.7.0a6 (2D Shadow Geometry (Geometry Version) is not available in Project Settings)
Tested on (OS): macOS 26.6.1 (Apple silicon)