Skip to content
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

Adding single Particles2D node cuts framerate in halve #25309

Closed
golddotasksquestions opened this issue Jan 25, 2019 · 7 comments
Closed

Adding single Particles2D node cuts framerate in halve #25309

golddotasksquestions opened this issue Jan 25, 2019 · 7 comments

Comments

@golddotasksquestions
Copy link

golddotasksquestions commented Jan 25, 2019

Godot version:
Godot 3.0.6, Godot 3.1 beta2

OS/device including version:
Win7 Professional i7-4800MQ CPU @ 2.7 GHz
GeForce GTX 765M 2048MB
https://www.geforce.com/hardware/notebook-gpus/geforce-gtx-765m/specifications
latest drivers installed

Issue description:
Adding a simple Particles2D node cuts framerate in halve.
I've simply added one Particles2D node and assigned ParticlesMaterial. Suddenly 60 suddenly drops to 30 FPS when vsync is on. This is also the case in 3.1 beta2 if Particles are emiting. In 3.0.6 also if they are not emitting.

Godot has been assigned to always run on the dedicated graphics card inside the Nvidia driver. There is a led-indicator light for that purpose that glows when I start Godot.

Turning off Nvidia vsync and one particle node: 60-50 FPS + terrible frametime jitter when camera is moving (also unplayable)
Turning off Nvidia vsync and no particle node: 120-100 FPS + terrible frametime jitter when camera is moving (also unplayable)

-> Notice again: halve the framerate

Turning off Nvidia vsync and Godot vsync off and one particle node: 120-100 FPS + terrible frametime jitter when camera is moving (also unplayable)

Strange behavior when first turning vsync off in Nvidia as well as Godot and then back on while Godot 3.0.6 is still running: Solid 60 FPS, plus no frametime jitter at all. Perfect! ...
... however only until I restart Godot ... then it's back to 30 FPS and therefore visible lag. (back to unplayable)

@Calinou
Copy link
Member

Calinou commented Jan 25, 2019

Out of curiosity, does this improve if you disable Windows Aero?

@golddotasksquestions
Copy link
Author

golddotasksquestions commented Jan 25, 2019

Not an improvement, but it does make a significant difference: With Windows Aero disabeled but vsync on in the Nvidia Driver as well as in Godot plus one standard Particle2D node, I get solid 60 FPS instead of the 30, but the frametime stutter is also clearly here. Which is at least as irritating as the low framerate.

It looks like vsync would be disabled, even though both settings say it's on, when Areo is disabled. Turning Aero back on and restarting Godot removes the stutter but again, halve the FPS because of one Particle2D.

@golddotasksquestions
Copy link
Author

golddotasksquestions commented Jan 25, 2019

I've just uninstalled all Nvidia drivers and restarted. So I would assume Godot is running just on the internal Intel graphics. The problem exactly the same however.

@TheDuriel
Copy link
Contributor

TheDuriel commented Apr 9, 2019

While i can't replicate the exact scenario, having a particle emitter with a material visible the in scene (2D scene, 3.1 release) does in fact have a large impact on framerate. (Unlocked) and introduces spikes. Irregardless of if anything is being drawn.

https://cdn.discordapp.com/attachments/540803169374961664/565304301019463681/unknown.png

Off, On, Off (Ingore the spikes in the second Off, i alt+tabbed.)

I imagine that this expected? drop is may be amplified by OPs specific work environment.

@Calinou
Copy link
Member

Calinou commented Dec 30, 2019

@golddotasksquestions (or anyone else) Can you reproduce this on Godot 3.2 beta4?

As for stuttering when using V-Sync, this merged pull request might help. You'll have to enable Display > Window > Vsync > Vsync Via Compositor in the Project Settings for it to be effective.

@golddotasksquestions
Copy link
Author

Thank you @Calinou for getting back to this issue!
I tested it again now in 3.1.2 stable as well as 3.2. beta 4.
In 3.1.2 it is present just as described in the original post, in 3.2.beta4 it is not present any more. No Framerate drop at all in 3.2. beta4 !! :)
(I noticed some other weird particle bug in 3.2.beta4 while testing this though: #34713)

@Calinou Calinou added this to the 3.2 milestone Dec 31, 2019
@Calinou
Copy link
Member

Calinou commented Dec 31, 2019

Thanks for answering; I'll close this as resolved then. I'm not sure what it'd take to solve this in the 3.1 branch, as there have been many changes to the renderer in the master branch.

@Calinou Calinou closed this as completed Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants