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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
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.