Search Issue Tracker
Fixed
Fixed in 2021.3.30f1, 2022.3.8f1, 2023.1.9f1, 2023.2.0a20
Votes
0
Found in
2020.3.46f1
2021.3.22f1
2022.2.13f1
2023.1.0b10
2023.2.0a9
Issue ID
UUM-32295
Regression
No
[DX12] DrawProcedural skips the draw call when "Fake Normal" is checked in Material settings
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scene.unity” Scene
3. In the Project window select “Mat” Material which is in the Assets folder
4. In the Inspector window check the “Fake Normal” checkbox
5. Observe the Scene
Expected result: All 3 cubes are seen
Actual result: Cube under the “DrawProcedural” text is not rendered
Reproducible with: 2020.3.46f1, 2021.3.22f1, 2022.2.13f1, 2023.1.0b10, 2023.2.0a9
Testing environment: Windows 10 Enterprise 21H2
Notes:
* DX12 DrawProcedural (and their variants, e.g. DrawProceduralIndirect) silently drops the draw call, if it (wrongly) thinks that the shader needs to access
data from a vertex buffer
* This might be the same issue as discussed on the forums since mid-2021, people say this started with 2021.2
[https://forum.unity.com/threads/drawproceduralindirect-broken-in-2021-2-with-dx12-vulkan.1139248/|https://forum.unity.com/threads/drawproceduralindirect-broken-in-2021-2-with-dx12-vulkan.1139248/|smart-link]
* All three cubes use the same material & shader
* On DX11 and Vulkan, everything works more like expected, no matter what's the "Fake Normal" material setting,
the square is visible
* Switched platform to Android and changed Graphics API to Vulkan and the project crashed with no Stack trace
* See "Shader.shader" comments and actual shader code for more details
* The issue is with ShaderGraph: even if we make it not actually *use* the declared vertex inputs, due to
the above issue DX12 still skips the draw call, because it assumes that the shader needs a vertex buffer
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
- Asset Database warning is being logged continuously when creating a script in an embedded package
- The Scene is marked as dirty when navigating Hierarchy by using arrow keys
- Build process only shows Initializing when building for Android
- TileMap Palette preview flickers when scaled
- Shader Graph Blackboard "plus" sign is not centered within the button
Resolution Note (fix version 2023.2.0a20):
Emulated vertexbuffers provided on platform neutral level when required