Search Issue Tracker
Forward renderer fails to render objects front to back and fails to batch when using a replacement shader
How to reproduce:
1. Download attached project file and open "Main" scene
2. Open the Frame Debugger
3. Notice all jobs correctly batch the cubes together but the ReplacementPass.Job.
4. Notice the order in which the cubes are rendered in the ReplacementPass.Job
Actual result: When using a replacement shader, including Unity's built-in ones like the one used to render the DepthNormals texture,
the order in which objects are renderer does not follow the front-to-back logic and the dynamic batching does not work.
Expected result: I believe a replacement shader should not disable batching and should follow the camera logic for ordering. On mobile devices especially, dynamic batching can save a lot of performances and in our tests, the increased draw call count was the main reason the performance was dropping when using some post-process effects.
Reproduced with: 5.6.3p3, 2017.1.1f1, 2017.2.0b11, 2017.3.0a7
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Linux] C# Reflection performance is 50 to 60 times slower
- The scrollbars are moving as one when scrolling one of the scrollbars in the Array of Text Fields
- Renaming the Animation Transition applies to another Transition when Enter is not hit after the renaming
- Editor crashes on Play Mode when using Voxel Play Environment Script
- Decimal function values are incorrect when running the build with IL2CPP Scripting Backend