Kuma-Boo / project-reignition

A remake of Sonic and the Secret Rings
Other
29 stars 5 forks source link

[BUG] Severe shader stuttering when first running levels #64

Open Kuma-Boo opened 4 months ago

Kuma-Boo commented 4 months ago

Bug Description

Stages stutter due to shader compilation during the first playthrough. This is a major issues for Sonic games, as they are based on replayability--where a good first impression is required.

There should be a check at the beginning of the game that prompts the player to create a shader cache when no save data exists, or if existing save data is from a different version of the game. The option to manually create the shader cache should also be available in video settings.

To build the cache, the game simply needs to display every type of material on screen for a single frame. I need to do some testing to figure out how to automate this.

Reproduction Steps

  1. Run the game on a new computer (clear the shader cache).
  2. Play any level.

System Information

Game Version: main branch

OS/Platform: N/A

Kuma-Boo commented 4 months ago

Fixed as of the latest master build.

Kuma-Boo commented 4 months ago

Upon further testing, the game still stutters slightly.

Kuma-Boo commented 3 months ago

"Fixed."

Apparently, Particle Processing Materials can cause stuttering as well. I forgot to save some materials externally, causing them to not be pre-compiled and leading to stuttering.

There are still a couple of Particle Materials that need to be saved externally; I'll get around to them when I can.

Kuma-Boo commented 3 months ago

aaaand it's still here.

Kuma-Boo commented 3 months ago

The current implementation of shader compilation doesn't seem to work properly when the video settings change. Shaders should probably be compiled during loading rather than on startup.

Kuma-Boo commented 2 months ago

Per-stage shader compilation has been implemented. There are still a few cases where people report stuttering, although I'm not sure what causes this.