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
- "Customize handled extensions" part in the External Tools settings tab is not aligned with other properties
- Editor Diagnostics foldouts do not open when clicked on the foldout title
- [UI Builder] Visual Elements are not placed at the mouse cursor position when Absolute Position Placement is enabled
- "Width" and "Height" text is misaligned with slider ends in Screen Match Mode Parameters section of Panel Settings Asset
- Editor does not quit when Editor is not in focus and any floating window is opened
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.