Search Issue Tracker
By Design
Votes
1
Found in
2021.3.9f1
2022.1.17f1
2022.2.0b8
2023.1.0a11
Issue ID
UUM-14788
Regression
No
[DX12] Object becomes invisible in the scene when changing to DX12
Reproduction steps:
1. Open the attached project “MeshTest”
2. Open “Test” Scene
3. Inspect the Scene view
4. Go to Edit > Project Settings > Player and change Graphics API to “Direct3D12”
5. Inspect the Scene view
Expected result: Procedural Mesh is rendered - sphere is visible in the Scene
Actual result: Scene view is empty - no objects are visible
Reproducible with: 2021.3.9f1, 2022.1.17f1, 2022.2.0b8, 2023.1.0a11
Could not test with: 2020.3.39f1 (Shader error in ‘MudBun/Mud Mesh Single-Textured (HDRP)': Couldn't open include file 'Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl'. at line 1093. Shader doesn’t load properly)
Reproducible on: Windows 10
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
- Spots of bad lighting appear on assets when the lighting is generated in a Scene
- Static Editor Flags dropdown list is cut off when Inspector Window is docked to the very right and UI Scaling is set to a higher value
- visionOS Players are minimized when Guided Access is turned on
- Licensing Client fails to launch when opening Unity Hub
- Sprite Atlas Inspector preview disappears when entering Play mode unless SpriteAtlasMode is set to "Sprite Atlas V2 - Enabled"
Resolution Note:
You can launch the editor with -debug-d3d12-null-geometry and it will work.
The shader expects vertexbuffers even though proceduralgeometry is explicitly meant for drawing without vertexbuffers. Unfortunately we have 3 different behaviours inside the engine for the cases where it does want them:
DX11 provides fake vertexbuffer that give zeroes
Vulkan optimizes the shader so that vertexbuffers that are asked but not actually needed are ignored. But if one is actually needed it does not work.
DX12 does not work if the vertexbuffers are even asked
Unfortunately we cannot yet put a decent error message here as there are some things in Editor that call this with broken state and expect the call to be ignored. Users should just write their shaders not to want vertexbuffers if they don't want them. If vertexbuffer is needed then the drawing should happen with using a mesh.