Search Issue Tracker
By Design
By Design in 2023.1.X
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
- 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:
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.
Resolution Note (2023.1.X):
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.