Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2019.4.10f1
2020.2
Issue ID
1279452
Regression
No
Meshes are not rendered in Game View when replacing certain shaders with Camera.SetReplacementShader and an empty replacementTag
How to reproduce:
1. Open user-submitted project (RenderWithShader.zip)
2. Open the SampleScene
3. Enter Play Mode
4. Click each of the buttons to see the varying results for Camera.SetReplacementShader
Expected result: both cubes are rendered in all 3 scenarios
Actual result: only one cube is rendered(depending on scenario)
Reproducible with: 2018.4.27f1, 2019.4.11f1, 2020.1.6f1, 2020.2.0b3
Notes:
The 3 buttons in Game View cause the following results:
1) Cube is using [Particles/Standard Unlit] shader. SetReplacementShader([Standard], null) is called. Cube is no longer being rendered in Game View(but it appears in Frame Debugger under LoopRenderJob)
2) Cube is using [Particles/Standard Unlit] shader. SetReplacementShader([Unlit/Color], null) is called. Cube is no longer being rendered in Game View and does NOT appear under RenderLoopJob in Frame Debugger.
3) Cube is using [Standard] shader. SetReplacementShader([Particles/Standard Unlit], null) is called. Cube is no longer being rendered in Game View(but it appears in Frame Debugger under LoopRenderJob
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
- Too little validation messages in the "WebAssembly Language Features" Memory settings
- Project Settings Search Highlights are misaligned when using the Bitmap Text Rendering Mode
- "GetControlID at event ValidateCommand returns a controlID different from the one in Layout event" Warning is thrown when undoing the deletion of Sprite Shape Profile
- Memory related fields in the "WebAssembly Language Features" can be set to the negative numbers
- "WebAssembly Language Features" Header in the Player Settings has a smaller indentation
Resolution Note (2021.1.X):
Cases 1 and 3 are rendered properly if the Camera clear flags are not set to Skybox. This is due to objects being rendered with a different render queue after setting the replacement shader (Opaque vs Transparent).
In case 2 the original material (Particles/Standard Unlit) explicitly disables rendering pass "Always", which is the only pass available in the replacement shader.