Search Issue Tracker
Won't Fix
Won't Fix in 2022.3.X, 2023.2.X, 2023.3.X
Votes
17
Found in
2022.3.14f1
2023.2.2f1
2023.3.0a16
Issue ID
UUM-57113
Regression
No
Crash on D3D12Fence::Wait when using Forward+ Rendering Path with Better Shaders asset
Reproduction steps:
1. Open the attached “repro-project“
2. Open the “Packages/com.jbooth.better-shaders/Samples/Scene.unity“ scene
3. In the Project window select the “Assets/Settings/Renderer3D.asset“ Universal Renderer Data asset
4. In the Inspector switch the Rendering Path from Forward to Forward+
Alternatively:
1. Create a new 3D (URP) project
2. Download and import the Better Shaders asset from [https://assetstore.unity.com/packages/tools/visual-scripting/better-shaders-standard-urp-hdrp-187838|https://assetstore.unity.com/packages/tools/visual-scripting/better-shaders-standard-urp-hdrp-187838|smart-link]
3. Open the “Packages/com.jbooth.better-shaders/Samples/Scene.unity“ scene
4. In the Project window select the “Assets/Settings/URP-HighFidelity-Renderer.asset“ Universal Renderer Data asset
5. In the Inspector switch the Rendering Path from Forward to Forward+
Expected result: The Editor recompiles shaders and switches to the Forward+ Rendering Path without crashing
Actual result: The Editor crashes during the recompilation of shaders
Reproducible with: 2022.3.14f1, 2023.2.2f1, 2023.3.0a16
Could not test with: 2021.3.33f1 (no “Forward+“ Rendering Path option)
Reproduced on: Windows 10
Not reproducible on: No other environment tested
First few lines of the stack trace:
0x00007FF684CAD625 (Unity) D3D12Fence::Wait
0x00007FF684CDBC31 (Unity) GfxDeviceD3D12::QueuePresent
0x00007FF684C96949 (Unity) D3D12Window::EndRendering
0x00007FF686310535 (Unity) GfxDeviceWorker::RunCommand
0x00007FF68631249B (Unity) GfxDeviceWorker::RunExt
-
Fabraz
Jan 23, 2024 09:01
Getting this as well but without the shader package. Happens randomly during editor use. Newest 2022 LTS.
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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Resolution Note:
There are no fixes planned for this Bug
Resolution Note (2023.3.X):
The root cause of this crash seems to be that the Better Shaders package does not support Forward+.
When Forward+ is enabled, URP supplies the lighting data to the shader in the format expected by Forward+, but the shader expects data in a completely different format and unluckily misbehaves badly enough to crash.
Unfortunately, due to how Forward+ is implemented as a multi_compile keyword, Unity is currently unable to issue an error message in this situation.
It seems that manually adding #pragma multi_compile _ _FORWARD_PLUS to the Better Shaders shaders fixes the issue, but since it's a third party package, this fix needs to be either done by the package author or the user of the package.
Resolution Note (2023.2.X):
The root cause of this crash seems to be that the Better Shaders package does not support Forward+.
When Forward+ is enabled, URP supplies the lighting data to the shader in the format expected by Forward+, but the shader expects data in a completely different format and unluckily misbehaves badly enough to crash.
Unfortunately, due to how Forward+ is implemented as a multi_compile keyword, Unity is currently unable to issue an error message in this situation.
It seems that manually adding #pragma multi_compile _ _FORWARD_PLUS to the Better Shaders shaders fixes the issue, but since it's a third party package, this fix needs to be either done by the package author or the user of the package.
Resolution Note (2022.3.X):
The root cause of this crash seems to be that the Better Shaders package does not support Forward+.
When Forward+ is enabled, URP supplies the lighting data to the shader in the format expected by Forward+, but the shader expects data in a completely different format and unluckily misbehaves badly enough to crash.
Unfortunately, due to how Forward+ is implemented as a multi_compile keyword, Unity is currently unable to issue an error message in this situation.
It seems that manually adding #pragma multi_compile _ _FORWARD_PLUS to the Better Shaders shaders fixes the issue, but since it's a third party package, this fix needs to be either done by the package author or the user of the package.