Search Issue Tracker
By Design
Votes
6
Found in
2022.3.37f1
6000.0.10f1
Issue ID
UUM-75294
Regression
No
The "INSTANCING_ON" shader variant is getting stripped when building the AssetBundle with the shader variant collection and the Instancing Variants set to Strip Unused
How to reproduce:
1. Open the “ReproAssetShader“ project
2. Open the “SampleScene“
3. Set the “Edit/Project Settings/Graphics/Instancing Variants“ to “Strip Unused”
4. Click on the “Tools/AssetBundle Build“ then create and choose the “StripUnusedOutput“ folder
5. Navigate to the “Tools/UTJ/AssetBundleCheck“ window
6. Click on the “Load Asset Bundle“ button
7. Choose the “svc“ file from the “StripUnusedOutput“ folder
8. Click on the “Dump“ button under the “Shaders/Universal Render Pipeline/Baked Lit Test“ section in the “AssetBundleCheckerWindow“
9. Expand the “Keywords“ section
Expected result: The “INSTANCING_ON” keyword is present
Actual result: The “INSTANCING_ON” keyword is not present
Reproducible with: 2022.3.37f1, 6000.0.10f1
Could not test with: 2021.3.40f1 (Could not test because of the shader errors)
Reproducible on: macOS 14.5 (Intel), Windows 10 Pro (22H2)
Not reproducible on: No other environments tested
Notes:
- Additional information about the project setup added in the internal notes
- Changing the “Edit/Project Settings/Graphics/Instancing Variants“ to “Keep All” does not strip the “INSTANCING_ON” shader variant
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
- UnityYamlMerge.exe doesn't correctly handle merge conflicts in modified properties on a prefab variant
- Inconsistent color scheme in "Details" section of "Select Presets" inspector window
- Crash on __pthread_kill when launching Editor via command-line with "-disableManagedDebugger" argument
- [VFX] Deleting “New Group Node” name doesn’t allow to type or add new name
- [VFX] Creating a long Group Node name breaks nodes boarders
Resolution Note:
Thank you for reporting a bug to Unity.
This behaviour is as designed.
To override the stripping behaviour:
* Open Project Settings (menu: Edit > Project Settings).
* Go to Graphics.
* In the Shader Stripping section, set Instancing Variants to Keep All.
Today we will be closing this case. Thank you again for taking the time to report this issue, and please let us know if there is anything else that changes the impact or severity of this issue.