Search Issue Tracker
By Design
Votes
1
Found in
2020.3.38f1
2021.3.10f1
2022.1.16f1
2022.2.0b7
2023.1.0a10
Issue ID
UUM-15002
Regression
No
Depth texture “_CameraDepthTexture” is not recognized when building for the Windows platform
Reproduction steps:
1. Open the user’s attached project
2. In the Project window select the “Depth” shader file
3. Make sure there are no errors in the Inspector window
4. Go to File -> Build Settings, for Target Platform select Windows, and press Build
5. When the build finishes, again select “Depth” shader in the Project window
6. Inspect the Console and Inspector windows
Expected result: There are no errors in both windows
Actual result: There is an error in Inspector and Console windows saying that 'sampler_CameraDepthTexture' is an undeclared identifier
Reproducible with: 2020.3.38f1, 2021.3.10f1, 2022.1.16f1 2022.2.0b7, 2023.1.0a10
Reproducible on: macOS 12.5
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
- Shader compile process adds shader ID to the constant buffer name when the word "Globals" is being used in Vulkan
- Audio Mixer Snapshot link to the documentation isn’t working
- [Android] UnityPlayer gets paused when another Activity is launched even with Run Without Focus enabled
- Animation Clip and kebab menu icons flicker when Cycle Offset value is being changed
- GameObject orientation incorrect when restarting Player after recentering the view on Meta Quest and Android XR
Resolution Note:
The variant for XR is failing to compile. This is because SAMPLE_DEPTH_TEXTURE requires different data when compiling for XR (their project has XR enabled). If you want a texture that works for depth sampling across the board, then UNITY_DECLARE_DEPTH_TEXTURE should be used to declared the texture sampler.