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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.