Search Issue Tracker
Fixed
Fixed in 6000.3.0b4, 6000.4.0a2
Votes
0
Found in
6000.3.0a5
6000.4.0a1
Issue ID
UUM-107502
Regression
Yes
Shaders fail to compile with "undeclared identifier 'FOG_EXP'" when using #pragma shader_feature FOG_LINEAR
Reproduction steps:
1. Open the attached “IN-100469.zip” project
2. From the Project Window, select “TestShader”
3. Right-click on it and select “Reimport”
4. Observe the Console and Shaders' information in the Inspector
Expected result: Shader compiles, and no compiler errors are shown
Actual result: Shader fails to compile with “undeclared identifier 'FOG_EXP'“ error
Reproducible with: 6000.1.0a5, 6000.1.4f1, 6000.2.0b3
Not reproducible with: 2022.3.62f1, 6000.0.50f1, 6000.1.0a4
Reproducible on: Windows 10 (User reported), Windows 11
Not reproducible on: No other environment tested
Notes:
- The Material with the Shader is also rendered pink in the Scene/Game view
- This appears to be due to an internal URP flag (FOG_LINEAR_KEYWORD_DECLARED) being set by the pragma, causing URP's fog logic to incorrectly attempt access to the undeclared FOG_EXP keyword in certain variants
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Addressables content build fails but the Player build is successful when building a development build
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Add comment