-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPUParticles3D lag spike on first instance #87891
Comments
I had a similar issue with 2d particles (same 4.2.1 version), just solved it with changing mode from Compatibility to Forward+. Maybe it's your case? |
Thanks for the report! Consolidating in #61233. As a workaround, display all particles within the view frustum for a single frame when the project starts. (This can be done while a solid ColorRect is shown to hide the particles.) |
Nah i'm using forward+ so this isn't it |
Thanks for the answer, as mentioned I tried to to this before but I never tried to make sure they were within the view frustum., so I will give that a shot. It is annoying to have to do this for everything but at least it's a largely known issue in general |
I was facing the same issue in 4.3 stable using compatibility mode in a 2D project. Thanks for the comments, folks! I created a Node2D, attached the particles, and it emits once at the scene's instantiation, working fine! |
Tested versions
4.2.1 Stable
System information
Windows 10, i7-7700k, RTX2060, 16GB
Issue description
When emitting a particle for the first time. It'll cause the whole game to pause for a brief moment. This seems to only happen once the first time. But this issue is consistent for all particles used. It seems to be a caching issue, but I'm not sure why it would be this severe. Some particles are super simple, others not, but they all cause this seem stutter.
I've tested this on multiple different PCs, low + high end. And they all have this same issue, both in builds and editor. Changing the shadow filter quality settings seems to reset it in a way where if I had it on high for example, putting it to any of the other options will restart the process, having all the particles stutter on first instance, and then be completely fine every other time.
Profiler doesn't seem to show anything specific, but the spikes are pretty obvious.
Running a test, I only triggered half of them, and reloaded the project. The ones I triggered previously were fine but the new ones stuttered. I've been told Godot 4 should cache particles on load but not sure if its just not working here or what not. I've tried manually caching them on load but it seems to make no difference, but I'll mess around with it more...
For the nodes themselves. Some are attached to the player while some are just in the scene tree. I've tried using @onready referencing, accessing as special name, and using restart() instead of emitting == true.
In the video you can see 3 spikes in the video. The first when the dust clouds pop up, the 2nd when the orange stars and circles pop up and the last when going into the water. This is a stripped down version for this issue, but this same thing happens with any particles as mentioned earlier.
In case its an issue with my project itself. I tried to keep it mostly intact while still being stripped down. Maybe its the way its referenced or something with the drawpass/procress material? Hard to tell
8mb.video-qqk-rLv2cfj5.mp4
Steps to reproduce
Trigger GPUParticles3D node for the first time, one shot or regular.
Minimal reproduction project (MRP)
Github Demo.zip
The text was updated successfully, but these errors were encountered: