godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.49k stars 21.07k forks source link

Game (debug) stutters when switching visibility of GPUParticles3D if Godot isn't launched from steam #78915

Closed Sp1cyP3pp3r closed 1 year ago

Sp1cyP3pp3r commented 1 year ago

Godot version

4.0.3.stable

System information

Windows 10 | AMD Phenom II X4 810 | Radeon RX 560 Series | GA-880GM-UD2H | 6 GB RAM DDR3 | Vulkan Forward+

Issue description

When not launched from Steam, when I run the project and switch the visibility of any of the two current GPUParticles3D, the project stutters for a brief moment, then stutters out. These particle nodes are located in my player character node and are not visible by default; they are only visible when the player presses RMB (dishonored-esque abilities). The thing that concerns me is that if I launch Godot from the Steam library, when I run the project, there are absolutely no stutters on switching particle visibility.

The first video, Godot launched from Steam: https://github.com/godotengine/godot/assets/83341703/5723f179-0383-4502-ac90-d8f685b30bbc

The second video, Godot launched from its folder: https://github.com/godotengine/godot/assets/83341703/a9532ad1-4866-4eae-afdb-2aaccd57b791

P.S.: It happens, when I instance a box node in the second video, game stutters too.

Steps to reproduce

  1. Launch Godot from it's folder and then repeat this process for Godot from Steam
  2. Create Node with GPUParticles3D in it and switch it visibilty to false
  3. Write a code that turns this particle node's visibilty to true by pressing a button
  4. Run the project
  5. Press the button and experience sttuter when not launched from steam

Minimal reproduction project

N/A (lazy)

Calinou commented 1 year ago

Thanks for the report! Consolidating in https://github.com/godotengine/godot/issues/61233, as this is the same issue.

The thing that concerns me is that if I launch Godot from the Steam library, when I run the project, there are absolutely no stutters on switching particle visibility.

Steam has a shader precaching pipeline for Vulkan/OpenGL games, while running the game directly won't use this shader precaching pipeline.