Ported: Document support limitations for OmniLight cubemap shadows in GLES2 - Calinou

b03ceaba2f
This commit is contained in:
Relintai 2022-07-29 22:11:41 +02:00
parent c569ecfad1
commit 31136b3669
2 changed files with 7 additions and 1 deletions

View File

@ -23,7 +23,9 @@
See [enum ShadowDetail]. See [enum ShadowDetail].
</member> </member>
<member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight.ShadowMode" default="1"> <member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight.ShadowMode" default="1">
See [enum ShadowMode]. The shadow rendering mode to use for this [OmniLight]. See [enum ShadowMode].
[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 series don't support cubemap shadows and will fall back to dual paraboloid shadows as a result.
</member>
</member> </member>
</members> </members>
<constants> <constants>

View File

@ -6032,6 +6032,10 @@ void RasterizerStorageGLES2::initialize() {
//picky requirements for these //picky requirements for these
config.support_shadow_cubemaps = config.support_depth_texture && config.support_write_depth && config.support_depth_cubemaps; config.support_shadow_cubemaps = config.support_depth_texture && config.support_write_depth && config.support_depth_cubemaps;
if (!config.support_shadow_cubemaps) {
print_verbose("OmniLight cubemap shadows are not supported by this GPU. Falling back to dual paraboloid shadows for all omni lights (faster but less precise).");
}
frame.count = 0; frame.count = 0;
frame.delta = 0; frame.delta = 0;
frame.current_rt = nullptr; frame.current_rt = nullptr;