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
- Line Renderer Component elements do not fit in the Inspector window when minimising Inspector window is minimised
- “Do you want to apply changes?” warning pop-up appears when adding and removing list items in Player settings
- Line Renderer flickering in HDRP project when second Material field is set to None
- Texture 2D Importer fails to assing a default value to the "namefileidtable" when using a texture preset
- "ProcessRootMotion" method is called when "Apply Root Motion" is disabled in the Animator
This is a duplicate of issue #1330453