godotengine / godotengine/godot

Shader compilation regression starting from [v4.6-dev6] up to [v4.6.1-rc1]

Open
#116,228 6 comments 0 reactions 1 assignee Claimed by @blueskythlikesclouds View on GitHub
bug regression topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

**Regression exists starting with [4.6-dev6]**
Personally tested with versions below. But highly likely that any version after [4.6-dev6] has this.

Reproducible: [4.6.1-rc1], [4.6-stable], [4.6-rc1], [4.6-beta1], [4.6-dev6].
Not reproducible: [4.6-dev5], [4.6-dev3], [4.6-dev1], [4.5.2-rc1], [4.5.1-stable], [4.5-stable].

### System information

Godot v4.6.dev6 - Linux Mint 22.2 (Zara) on X11 - X11 display driver, Multi-window, 1 monitor - Vulkan (Forward+) - dedicated AMD Radeon RX 6700 XT (RADV NAVI22) - AMD Ryzen 7 5800X 8-Core Processor (16 threads) - 31.23 GiB memory

### Issue description

After migrating my project from [4.5.1-stable] to [4.6-stable] some functionality in my game began to exhibit stuttering in the form of FPS drops. These are some of the examples:
1. Showing VoxelGI during runtime (expected to lead to FPS drops, but it was previously not noticeable)
2. Using ResourceLoader.load_threaded_request() on scenes (also expected, but did not lead to noticeable stutters before)

While testing my project between the versions, it seems that there is about a 5x increase in process time relating to the above shader compilation tasks. A compilation that would increase process time to 5ms in [4.5.1-stable] ends up taking 25ms in [4.6-stable] with all variables controlled for.

I've attached an MRP to demonstrate this with VoxelGI. I've not been able to recreate this for ResourceLoader consistently outside of my game project as my code is a mess and there are too many variables to consider.

### Steps to reproduce

1. Run the MRP attached in [4.6.dev6]
2. Observe and note the FPS and Process values as VoxelGI turns on
(on my system: FPS: ~46 | Process: ~0.26)
3. Run the MRP in [4.6.dev5]
4. Re-bake VoxelGI
5. Observe the same values. Process time is expected to reduce by 5 times
(on my system: FPS: ~60 | Process: ~0.06)

### Minimal reproduction project (MRP)

[MRP.zip](https://github.com/user-attachments/files/25275711/MRP.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.