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

2D optimizations issue on Adreno ("SnapDragon") GPUs #73805

Closed
nx7r opened this issue Feb 23, 2023 · 6 comments · Fixed by #100302
Closed

2D optimizations issue on Adreno ("SnapDragon") GPUs #73805

nx7r opened this issue Feb 23, 2023 · 6 comments · Fixed by #100302

Comments

@nx7r
Copy link

nx7r commented Feb 23, 2023

Godot version

4.0 rc3

System information

SD 860, SD 665, SD 662, GL/Mobile rendering device

Issue description

When any kind of 2D light is added to the scene, the frame rate drops to 9fps

Note : My device xiaomi POCO X3 Pro

Steps to reproduce

  1. add PointLight2D to the scene
  2. export the project to Android device wich have a SnapDragon CPU
  3. than all magic will happen (fps drops)

==> Running this demo on that devices will make the same issue:
https://github.com/godotengine/godot-demo-projects/tree/master/2d/lights_and_shadows

Minimal reproduction project

https://github.com/godotengine/godot-demo-projects/tree/master/2d/lights_and_shadows

@nx7r nx7r changed the title 2D optimizations issue on Adreno ("SnapDragon") GPUs 2D optimizations issue on Adreno ("SnapDragon") GPUs Feb 23, 2023
@clayjohn
Copy link
Member

Have you tested both the mobile renderer and the gl_compatibility renderer? Note: you have to change the rendering_method.mobile setting in order to change the renderer on mobile. Changing just rendering_method isn't enough

@clayjohn clayjohn added this to the 4.x milestone Feb 23, 2023
@nx7r nx7r closed this as completed Feb 23, 2023
@nx7r nx7r reopened this Feb 23, 2023
@nx7r
Copy link
Author

nx7r commented Feb 23, 2023

@clayjohn Yes, I have tested both mobile and gl_compatibility renderer.

@clayjohn
Copy link
Member

And you are getting exactly 9 FPS on both backends?

@nx7r
Copy link
Author

nx7r commented Feb 24, 2023

@clayjohn not exactly: fps_range[9, 18]

@Calinou
Copy link
Member

Calinou commented Feb 25, 2023

Can you reproduce this with a lower rendering resolution? Set the stretch mode to viewport in the project settings (ensure it's saved to project.godot), then export the project to Android again.

I get a feeling we should implement 2D resolution scaling like we did for 3D, as rendering lights at full resolution on mobile is very expensive in terms of fillrate.

@clayjohn
Copy link
Member

Tested on an Adreno 640 device and had a consistent 11-12 FPS, with #100302 its now locked at 60 FPS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants