Search Issue Tracker
Active
Under Consideration for 6000.1.X, 6000.2.X
Votes
0
Found in
6000.1.4f1
6000.2.0b3
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
- HDRP 6-way VFX Shader is lit incorrectly when World coordinates are used
- 2D Sprite Renderer in front is affected by Sprites in the background when using Sorting Layers and a Shadow Caster 2D with Self Shadow
- Modifying UI Prefab child's Height only confirms the first 1 or 2 digits when the Scene is newly opened or the Prefab is newly created
- ProfilingSampler.Get() returns null and makes the Player only render black when building a Release Build
- Search text field visual controls for the Path binding in an Input Actions Asset is misaligned
Add comment