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

3D Particles Leads to FPS Drop #29973

Closed
sarooptech opened this issue Jun 22, 2019 · 6 comments
Closed

3D Particles Leads to FPS Drop #29973

sarooptech opened this issue Jun 22, 2019 · 6 comments

Comments

@sarooptech
Copy link

Godot version: 3.1.2

OS/device including version: Manjaro Linux and Android Oreo

Issue description: When I Emmit Partcles for the First Time FPS Drops and game gliches. On Second time there is no issue. I createad a Particles Scene and then created instance of it in main scene using GDScript. I also tried it with Android and experienced the same problem.

Screenshots

  • FPS at Start
    Idle FPS

  • FPS at First Particle Emmition
    First Particle Emission

Steps to reproduce: Open and run project provided by me and then and then hit "Enter" you will see FPS Dropping and Glitch. FPS count is at the bottum left of the Scene.

Minimal reproduction project:
ParticlesFPSDrop.zip

@clayjohn
Copy link
Member

Duplicate of #13954 and #17263

This issue is caused by the shader having to compile on the first frame it is shown. Here is a great youtube video explaining how to work around the problem. https://www.youtube.com/watch?v=Cg4ZT6X0ghs

@sarooptech
Copy link
Author

I tried without adding any Shader Material and still facing same problem.

@clayjohn
Copy link
Member

There is a spatial material on the object and a particles material for the particles. Both need to compile. In order to avoid the hiccup, you need to follow the steps in the video. i.e. Have the particles appear in the scene for a frame before the scene is loaded so that the shader compiles.

@sarooptech
Copy link
Author

sarooptech commented Jun 22, 2019

I have a mian Scene that contains Instances Particles, I don't understand how to implement what you are suggesting?

@sarooptech
Copy link
Author

I switched to GLES2 and Converted Particles to CPUParticles and there no more glitches.

@mipsc
Copy link

mipsc commented Jan 2, 2021

Duplicate of #13954 and #17263

This issue is caused by the shader having to compile on the first frame it is shown. Here is a great youtube video explaining how to work around the problem. https://www.youtube.com/watch?v=Cg4ZT6X0ghs

I'm having this issue and been struggling to solve it for weeks already, and I applied the trick and I got it finally solved!

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