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

Decrease the default number of SDFGI cascades to 4 #57707

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Feb 6, 2022

Follow-up to #49738 and #54677.

This improves rendering performance noticeably, especially when the camera moves fast. The SDFGI detail remains identical otherwise.

On a medium-sized test scene on a GTX 1080 in 2560×1440, going from 6 to cascades saves 0.5 ms of frame time while looking visually identical (as most of the scene fits within the 4 cascades).

For particularly large scenes, there are still benefits to using more cascades. However, there is no visual benefit to using lots of cascades in small/medium-sized scenes.

Testing project: test_sdfgi_performance.zip

Preview

Before

2022-02-06_14 51 02

After

There is a small difference if you look outside the window, but it won't be noticeable in most situations.

2022-02-06_14 51 22

This improves rendering performance noticeably, especially when the
camera moves fast.

On a medium-sized test scene on a GTX 1080 in 2560×1440, going
from 6 to cascades saves 0.5 ms of frame time while looking visually
identical (as most of the scene fits within the 4 cascades).
@fire
Copy link
Member

fire commented Feb 9, 2022

Out of the box, I would like to have SDFGIs on by default.

By making the default of 4 or even 1 SDFGI cascade will help Godot Engine look more physical and more aesthetic of the box.

@Calinou
Copy link
Member Author

Calinou commented Feb 9, 2022

Out of the box, I would like to have SDFGIs on by default.

I don't think enabling SDFGI by default is a good idea for a few reasons:

  • SDFGI is still too slow for older integrated graphics (anything older than 11/12th generation Intel Iris Xe).
  • Stylized games generally don't need GI.
  • If you use LightmapGI or VoxelGI, you should generally disable SDFGI. If SDFGI is enabled by default, then many people will forget to do that and suffer from low performance.
  • SDFGI has a cost even if no meshes use the Static bake mode.

However, you can already enable SDFGI quickly in the 3D editor environment preview:

image

In general, I think Godot should strive to make users only pay the performance cost for the features they actually use 🙂

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved in PR review meeting.

@akien-mga akien-mga merged commit 2fafcfe into godotengine:master Feb 10, 2022
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the sdfgi-tweak-default-num-cascades branch February 10, 2022 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants