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

Default to 32-bit depth map on Forward+ renderer and 24-bit only on Mobile renderer #87057

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

clayjohn
Copy link
Member

Discussed here: godotengine/godot-proposals#7366

Most desktop devices support DATA_FORMAT_D32_SFLOAT_S8_UINT (Windows: 99.88%; Linux: 98.66%; Mac: 100%) and there is very little or no performance hit for using it (for AMD it might even be faster since D24 is emulated).

For mobile devices we want to use DATA_FORMAT_D24_UNORM_S8_UINT wherever possible as the practical limit is 32 bits before performance drops off. Its also much better supported on Android (98.76%). iOS only supports DATA_FORMAT_D32_SFLOAT_S8_UINT so the format check will fail and always fall back to DATA_FORMAT_D32_SFLOAT_S8_UINT.

An extra note. In most cases the current check was sufficient as a significant number of desktop devices don't support DATA_FORMAT_D24_UNORM_S8_UINT while a significant number of android devices don't support DATA_FORMAT_D32_SFLOAT_S8_UINT. But on a lot of desktop devices we were unnecessarily using DATA_FORMAT_D24_UNORM_S8_UINT.

@clayjohn clayjohn added this to the 4.3 milestone Jan 10, 2024
@clayjohn clayjohn requested a review from a team as a code owner January 10, 2024 19:53
@clayjohn clayjohn marked this pull request as draft January 10, 2024 20:20
@clayjohn clayjohn marked this pull request as ready for review January 10, 2024 20:24
@akien-mga akien-mga merged commit c5025ea into godotengine:master Jan 11, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

Calinou referenced this pull request in etlegacy/etlegacy Apr 22, 2024
There's no such thing as 32-bit depth and it tends to cause massive framedrops and/or crashes anyway.
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.

3 participants