How to reproduce:
- Open the “IN-150872” project
- Open the “Assets/Scenes/SampleScene.unity” scene
- Enter Play mode
- In the Hierarchy, select the “Reproduction Squares” GameObject
- In the Inspector, modify the Sorting Order field to a value below 21 (e.g. 20)
- Observe the Game view
- In the Inspector, modify the Sorting Layer field to “Default”
- In the Inspector, modify the Sorting Order field to a value above 23 (e.g. 24)
- Observe The Game view
- (Optional) Change the Sorting Layer and/or Order in Layer of the red and white squares and observe how the Game view changes
Actual result: The right blue square (rendered via standard MeshRenderer component) is correctly affected by its sorting layer and sorting order, while the left square (rendered via Graphics.RenderMeshIndirect()) is always rendered as if it is on layer Default with sorting order 0 despite being set to a different layer and/or different sorting order
Expected result: Both squares should be drawn identically as they are set to the same sorting layer and the same sorting order.
Reproducible with: 6000.5.0a8, 6000.6.3f1, 6000.7.0b2, 7000.0.0a5
Could not test with: 6000.0.0f1, 6000.0.84f1, 6000.3.25f1 (The fields RenderParams::sortingLayerId and RenderParams::sortingOrder were introduced in 6000.5.0a8)
Reproducible on: macOS 27.0 (M1 Max), macOS 26.5 (M5) (by user)
Not reproducible on: No other environments tested