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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Add comment