Default to 32-bit depth map on Forward+ renderer and 24-bit only on Mobile renderer #87057
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 supportsDATA_FORMAT_D32_SFLOAT_S8_UINT
so the format check will fail and always fall back toDATA_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 supportDATA_FORMAT_D32_SFLOAT_S8_UINT
. But on a lot of desktop devices we were unnecessarily usingDATA_FORMAT_D24_UNORM_S8_UINT
.