Search Issue Tracker
In Progress
Fixed in 6000.0.51f1, 6000.1.6f1, 6000.2.0b4
Fix In Review for 6000.3.0a1
Votes
11
Found in
6000.0.36f1
6000.1.0b4
6000.2.0a1
6000.3.0a1
7000.0.0a1
Issue ID
UUM-96217
Regression
Yes
Mesh triangles and shadowcaster values increase for Intermediate Renderers when 'Occlusion Culling' is used and 'Cast Shadows' is enabled on the Mesh
Reproduction steps:
# Open attached IntermediateRendererOcclusionTest project
# Open SampleScene
# Open the window for Occlusion Culling/Baking and make sure that there is baked occlusion culling data
# If not, enable "GameObject" in the Hierarchy window and bake
** Once baking is done, disable "GameObject"
# Ensure that "MeshDrawer" is enabled
# Enter play mode and enable the stats overlay for the Game view
# Enable and disable occlusion culling setting on the MainCamera while in play mode
## take note of the change in number of shadow casters and vertex counts
## enabling occlusion culling increases both counts
## disabling occlusion culling decreases both counts
# Open frame debugger and enable it
# step through the opaque shadows pass
# Enable and disable occlusion culling again and observe the shadow pass each time
** take note of the increase in draw events for when occlusion culling is enabled
Expected: Occlusion culling results in the same number of shadowcasters and vertex counts in the worst case and decreases both counts in the best case
Actual: Occlusion culling increases these counts and results in more rendering work for shadowcasters
Reproduction steps:
1. Open the attached “Grass_bug.zip” project
2. Open the SampleScene”
3. Enter the Play mode
4. In the Game view open the Stats Window
5. Observe the Tris value
6. Select the “Main Camera” GameObject from the Hierarchy
7. In the Inspector, disable Occlusion Culling
8. Observe the Tris value again
Expected result: The value does not change
Actual result: When “Occlusion Culling” is disabled the Tris value drops from “2.2mil” to “982k”
Reproducible with: 2023.3.0b5, 6000.0.36f1, 6000.1.0b4, 6000.2.0a1
Not reproducible with: 2022.3.57f1, 2023.3.0b4
Reproducible on: Windows 10 (User reported), Windows 11
Not reproducible on: No other environment tested
Note:
- Changing the ‘Cast Shadows’ property to ‘Off’ on the Assets/Scenes/Bug/Cube.prefab makes the issue also not reproduce
Comments (3)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Unity Version Control window during "Create workspace" updates only when the mouse is moved
- Crash on AudioMixer::GetFloat when entering Play Mode in a specific project
- Test assembly files are not generated when using a local package included in a subdirectory
- URP Terrain Shaders are always included when building on any target platform
- Multiple errors thrown and Scene/Game view is not rendered when Lighting Override Mask is set to the same layer as the Volume
Pandazole
Feb 26, 2025 11:27
I wondered why enabling/disabling the terrain makes a 30% performance difference. Could it be related to this issue, especially since the terrain is not heavily populated?
NatureManufacture
Feb 21, 2025 10:18
Small update.
Shadow cascades generate these triangles.
Each shadow cascade multiply triangles from shadows, it means they do not mask themself just add more overhead.
NatureManufacture
Feb 20, 2025 22:36
I would like to add info that it's not only about occlusion culling.
I tested many scenes that use foliage and unity terrain.
In most cases, Unity 6 scenes (the same scene the same setup) have a lot more triangles because of shadows.
HD RP: 2022.3, 4mln tri, 6000batches ---> Unity6 7mln tri 9000 batches
URP 2022.3 5mln tri 6000 batches ---> Unity6 11mln tri 15000 batches.
So at URP, the engine produces shadows triangles x2 at HD RP only x1.5
When I turn off shadows, the triangle amount at 2022.3 and Unity 6 are the same.
Looks like a screen occlusion problem. Seams it doesn't cull verts that come from shadows outside the screen.
This generates a huge performance drop when you jump from 2022.3 into Unity6