Search Issue Tracker
By Design
Votes
0
Found in
2022.3.63f1
6000.0.51f1
6000.1.8f1
6000.2.0b5
6000.3.0a1
Issue ID
UUM-109823
Regression
No
Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
Reproduction steps:
1. Open the attached “IN-104980.zip” project
2. Open the “FogBuildTest” Scene (Assets > Scenes)
3. Enter Play mode
4. Observe the capsules far at the end (occluded by fog)
5. Exit Play mode
6. "Build and Run" the “FogBuildTest” Scene
7. Observe the Player
Expected result: The capsules far at the end are occluded by fog, like in the Editor
Actual result: The capsules far at the end are not occluded by fog and are visible
Reproducible with: 2022.3.63f1, 6000.0.51f1, 6000.1.8f1, 6000.2.0b5, 6000.3.0a1
Couldn’t test with: 2022.1.0a1, 2022.2.0f1 (Couldn’t downgrade)
Reproducible on: macOS 14.5 (M1 Ultra) (user reported), Windows 11
Not reproducible on: No other environment tested
Notes:
- Does not reproduce when the "Strict shader variant matching" option is enabled in Edit > Project Settings > Player> Other Settings
- The behavior of the "Strict Shader Variant Matching" option is counter-intuitive in this case. Disabling the option causes required shader variants to be stripped from the build, while enabling it correctly includes them. This is contrary to the expectation that enabling the option would be more restrictive
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
- Editor Launch Screen will close when Enter is pressed on it
- ObjectPool's pool is destroyed when entering Play Mode without reloading Domain
- [Android] Permission window is not shown when using a Build App Bundle (Google Play) with Minify set to Release
- NullReferenceException errors appear in the Console and Inspector window turns black when dragging .cs and .uxml files to another directory
- Crash when reimporting fbx asset used as tree by specific Terrain component
Resolution Note:
Enabling the 'Strict variant matching' option ensures that if the variant is missing from the build an error is reported. When it's not enabled, the application silently chooses a "close enough" variant.
The API documentation clearly states this: https://docs.unity3d.com/ScriptReference/PlayerSettings-strictShaderVariantMatching.html.