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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.