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

Vulkan: Low FPS with default environment on low-end graphics cards #54717

Closed
floppyhammer opened this issue Nov 7, 2021 · 19 comments
Closed

Comments

@floppyhammer
Copy link
Contributor

Godot version

v4.0.dev.calinou [bd31af3]

System information

Ubuntu 21.10, Vulkan Clustered, AMD Radeon R7 260X

Issue description

Low FPS in 3D scenes compared to 3.4. 2D scenes seem normal.

4.0
Screenshot from 2021-11-07 21-04-19

3.4
Screenshot from 2021-11-07 21-03-35

Steps to reproduce

Just create an empty 3D scene and enable View Frame Time to check FPS.

Minimal reproduction project

No response

@akien-mga
Copy link
Member

Vulkan Clustered is the high end renderer, so low framerate on low-end hardware is expected.
You should try Vulkan Mobile which should hopefully perform somewhat better.

There might be ways to optimize and get some more performance out of low end eventually, but it's not really a bug, it's a natural consequence of high end backend on low end hardware.

@floppyhammer
Copy link
Contributor Author

@akien-mga Vulkan Mobile doesn't perform any better. If it was expected, should probably close this issue.

@Zireael07
Copy link
Contributor

OP, are you sure you're using actual Vulkan drivers and not software MESA?

@mrjustaguy
Copy link
Contributor

mrjustaguy commented Nov 7, 2021

My GPU (Quadro K2000) which is significantly worse (about 40% of R7 according to https://www.techpowerup.com/gpu-specs/radeon-r7-260x.c2465 - compare with gt 640 which has comparable performance), doesn't preform nearly as badly as that on 4.0 FCR, I get this sort of performance with a million triangles and a handful of lights (1 directional, point lights for the rest) all with shadows at ~ 1mpx/frame

Side Note: Using Windows 10, not Linux

@Calinou
Copy link
Member

Calinou commented Nov 7, 2021

Glow is enabled in the default preview environment. You can disable it by clicking the 3 vertical dots at the top of the 3D editor viewport.

Since it doesn't make much of a visual difference most of the time, I suggest disabling glow by default.

@mrjustaguy
Copy link
Contributor

Glow doesn't explain the low FPS here, SDFGI maaaaybe, but even that is unlikely.

@floppyhammer
Copy link
Contributor Author

@Zireael07 I didn't know such software implementation of Vulkan exists...

If I add an empty WorldEnvironment, the FPS just soars:

image

And it increases further after adding an Environment:

image

@Calinou
Copy link
Member

Calinou commented Nov 8, 2021

Unlike the preview environment, the blank/default environment has glow disabled. This likely explains the performance difference.

@clayjohn
Copy link
Member

clayjohn commented Nov 8, 2021

@floppyhammer In the first screenshot did you move the editor camera around at all? The editor pauses frames until there is some change on screen. If the GPU is waiting on something from the CPU, sometimes this will result in the GPU reporting the full time it waited as part of the frame time.

If you are still seeing the same FPS as the camera moves around in the 3D editor, then the performance is almost certainly caused by glow as Calinou suggested.

@floppyhammer
Copy link
Contributor Author

@clayjohn Same FPS when the camera moves around.

@Zireael07
Copy link
Contributor

it doesn't make much of a visual difference most of the time

If it doesn't make much of a difference, why not disable glow on preview environments then?

@Calinou
Copy link
Member

Calinou commented Nov 9, 2021

If it doesn't make much of a difference, why not disable glow on preview environments then?

I just amended #49736 to disable glow by default 🙂

Edit: Glow is no longer disabled by default in #49736 per reduz's request.

@Whimfoome
Copy link

Whimfoome commented Dec 12, 2021

OP, are you sure you're using actual Vulkan drivers and not software MESA?

Maybe there should be a warning when using software MESA, because on Linux with my GPU (AMD R9 280X), to enable Vulkan to work as intended I have to add radeon.cik_support=0 radeon.si_support=0 amdgpu.cik_support=1 amdgpu.si_support=1 as kernel parameters, or I get like 5 frames per minute. When added everything is running butter smooth, but maybe that's a problem related to my GPU only

@Calinou
Copy link
Member

Calinou commented Dec 12, 2021

Maybe there should be a warning when using software MESA

This can be done once #55790 is merged.

@FlykeSpice
Copy link

Vulkan Clustered is the high end renderer, so low framerate on low-end hardware is expected. You should try Vulkan Mobile which should hopefully perform somewhat better.

There might be ways to optimize and get some more performance out of low end eventually, but it's not really a bug, it's a natural consequence of high end backend on low end hardware.

Excuse me, wasn't the introduction of a Vulkan backend supposed to make Godot's renderer more efficient compared to the existing opengl backends(which is also the main point of the api) on low-end devices? What do you mean it being "high end" backend?

@Zireael07
Copy link
Contributor

wasn't the introduction of a Vulkan backend supposed to make Godot's renderer more efficient compared to the existing opengl backends(which is also the main point of the api) on low-end devices?

In short, you're right in the first half of your sentence (it's supposed to be more efficient) but Vulkan is NOT a low-end option. It's just more efficient than OpenGL on devices that ARE able to run it, plus it doesn't have the "broken drivers on mobile" problem GLES has. But it's definitely NOT low-end, evidenced by the fact that very FEW Android devices have this capability.

@Calinou Calinou added this to the 4.0 milestone Dec 25, 2021
@Calinou Calinou changed the title Low FPS on low-end graphics cards Vulkan: Low FPS with default environment on low-end graphics cards Dec 25, 2021
@KoBeWi KoBeWi moved this to To Assess in 4.x Priority Issues Jun 4, 2022
@KoBeWi
Copy link
Member

KoBeWi commented Jun 4, 2022

Is it by chance any better now?
There is an opengl3 driver available that you could try, but not sure if it supports 3D already.

@floppyhammer
Copy link
Contributor Author

@KoBeWi have no access to any low-end graphics cards currently, so I can't tell if there's any improvement.

@YuriSizov YuriSizov moved this from To Assess to Todo in 4.x Priority Issues Aug 24, 2022
@clayjohn
Copy link
Member

Closing as the OP no longer has the ability to confirm if performance has improved. The performance is consistent with what I see on my 2013 chromebook running Lubuntu (Intel Celeron N2840 2.16GHz). It seems likely the OP was either running a software fallback, or Godot is running on an integrated CPU instead of using the GPU. In either case there is nothing actionable for us.

@clayjohn clayjohn closed this as not planned Won't fix, can't repro, duplicate, stale Jan 12, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in 4.x Priority Issues Jan 12, 2023
@clayjohn clayjohn removed this from the 4.0 milestone Jan 12, 2023
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

9 participants