Search Issue Tracker
Duplicate
Votes
0
Found in
2020.3
2020.3.3f1
2021.1
2021.2
Issue ID
1335879
Regression
No
Shader.CompileGPUProgram takes more time to execute every time URP settings are modified and a shader is compiled
Reproduction steps:
1. Open the user's attached "AssetDatabaseRefreshBug.zip" project
2. Open the Profiler window and switch to Editor profiling
3. Select "UniversalRP-HighQuality" asset in the Settings folder
4. Change Lighting or Shadows settings (e.g. Main Light, Soft Shadows, etc) in the Inspector
5. Open the NewUnlitShader and make any change (e.g change LOD from 100 to 1000)
6. Open the Editor and note the CPU spike in the Profiler window
7. Repeat steps 3-6 a few more times (~3-10) and observe the Profiler
Expected result: Shader.CompileGPUProgram execution time does not change
Actual result: Shader.CompileGPUProgram execution time increases
Reproducible with: 2020.3.12f1, 2021.1.11f1, 2021.2.0a15
Not reproducible with: 2021.2.0a16 (<100ms), 2021.2.0a19
Could not test with: 2018.4, 2019.4 (project breaks on downgrade)
Notes:
- the execution time increases inconsistently, it might only increase only after every 5 or 10 attempts
- an example of how fast it can increase in 2021.1.10f1 (ms): 85, 283, 353, 330, 355, 340, 341, 436, 550, 670, 671
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
This is a duplicate of issue #1330453