Search Issue Tracker
By Design
Votes
0
Found in
2021.3.20f1
2022.2.11f1
2023.1.0b8
2023.2.0a6
Issue ID
UUM-29679
Regression
Yes
[URP][Android] _SCREEN_SPACE_OCCLUSION keyword is not turned off in Shader when SetActive (false) is set in the Render Feature SSAO
Steps to reproduce:
1. Open the attached user's project "SSAO BuildTest.zip"
2. Open the "Assets/Scenes/SampleScene.unity"
3. Build to an Android Device
4. Toggle SSAO off/on
5. Observe how SSAO is turned off however object colors appears more darker
Expected results: _SCREEN_SPACE_OCCLUSION keyword is turned off in Shader when SetActive (false) is set in the Render Feature SSAO
Actual Results: _SCREEN_SPACE_OCCLUSION keyword is not turned off in Shader when SetActive (false) is set in the Render Feature SSAO
Reproducible: URP 12.1.10 - 16.0.0 (2021.3.20f1, 2022.2.11f1, 2023.1.0b8)
Not reproducible on: URP 10.10.1 (2020.3.46f1)
Could not effectively test due to SSAO not turning off/on on 2023.2.0a6
Reproducible on these devices:
VLNQA00317 - Vivo NEX 3 5G (V1924A), CPU: Snapdragon 855+, GPU: Adreno 640, OS: 9.0.0
N/A, Google Pixel 3 (Pixel 3), Android 12, CPU: Snapdragon 845, GPU: Adreno (TM) 630
VLNQA00413 - Samsung Galaxy Note10+ (SM-N975F), OS: 9, CPU: Exynos 9 Series 9825, GPU: Mali-G76
VLNQA00372 - Galaxy S21 5G (SM-G991U), CPU: Snapdragon 888, GPU: Adreno 660, OS: 11
VLNQA00202 - Samsung Galaxy Note 9 USA (SM-N9600), CPU: Snapdragon 845 SDM845, GPU: Adreno 630, OS: 9.0.0
VLNQA00177 - Xiaomi Mi Note 2 (Mi Note 2), OS: 6.0.1, CPU: Snapdragon 820 MSM8996, GPU: Adreno 530
VLNQA00231 - HUAWEI Mate 20 Pro (LYA-L29), OS: 9.0.0, CPU: HiSilicon Kirin 980, GPU: Mali-G76
VLNQA00406 - Galaxy Z Flip3 5G (SM-F711B), OS: 11, CPU: Snapdragon 888, GPU: Adreno 660
N/A, Samsung Galaxy S9 (SM-G960F), Android 8.0.0, CPU: Exynos 9 Series 9810, GPU: Mali-G72
Environment: Windows 10 22H2
Notes:
-Issue does not reproduce in Editor Play Mode
-Issue only reproduces on Android Platform
-On mobile, when Render Feature SSAO is setActive (false) in the script, the keyword _SCREEN_SPACE_OCCLUSION is not turned off in Shader, causing a problem with gray UnityDefault2D Texture in the _SSAO Texture
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
- "Modifying the parent of a VisualElement while it’s already being modified is not allowed" error is thrown when entering text and pressing tab in the Search window
- Mesh colliders are not updating their positions of bounds correctly
- Images are missing from the "Open the sprite editor" documentation for 6.0, 6.1 and 6.2
- The previous element in the array is modified when assigning an Asset to a new element of AssetReferenceT
- Unity Perforce Integration: VCS Connection Active State Fails via CLI with Valid Inputs
Resolution Note:
This is by design.
To reduce Shader Variants, URP by default strips out any unused variants when making builds. In this case the project only has one renderer with SSAO enabled so the OFF variant for it is stripped out in builds.
There are a few approaches to work around this.
1) Duplicate the renderer, add it to URP Assets and disable the SSAO renderer feature
2) Duplicate the renderer, add it to URP Assets and enable AfterOpaque in SSAO renderer feature
3) Duplicate the renderer, add it to URP Assets and remove the SSAO renderer feature
4) Turn off the "Strip Unused Variants" toggle in Global Settings