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
- Unused Particle System Renderer Mesh settings cause performance degradation when calling SetActive
- Project Browser shows the Asset folder empty when Select Dependencies is clicked without any asset selected
- Export as JSON and CSV options missing from the Quick Search save feature
- Crash on IMGUI::GUIWindow::OnGUI when rendering scene view window in play mode in a specific project
- "FileNotFoundException" & "IOException" thrown when adding "User" Index after deleting "Assets" Index in Search Index Manager window
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.