From c69b14e96e3191622c06aa1e98c7f15f1fc895d4 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Sat, 25 Feb 2023 16:24:41 -0800 Subject: Add warnings for unsupported features in mobile and gl_compatibility backends --- drivers/gles3/storage/material_storage.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'drivers') diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp index c585895f4b..99ec1e1ed8 100644 --- a/drivers/gles3/storage/material_storage.cpp +++ b/drivers/gles3/storage/material_storage.cpp @@ -3373,6 +3373,32 @@ void SceneShaderData::set_code(const String &p_code) { uses_vertex_time = gen_code.uses_vertex_time; uses_fragment_time = gen_code.uses_fragment_time; +#ifdef DEBUG_ENABLED + if (uses_particle_trails) { + WARN_PRINT_ONCE_ED("Particle trails are only available when using the Forward+ or Mobile rendering backends."); + } + + if (uses_sss) { + WARN_PRINT_ONCE_ED("Sub-surface scattering is only available when using the Forward+ rendering backend."); + } + + if (uses_transmittance) { + WARN_PRINT_ONCE_ED("Transmittance is only available when using the Forward+ rendering backend."); + } + + if (uses_screen_texture) { + WARN_PRINT_ONCE_ED("Reading from the screen texture is not supported when using the GL Compatibility backend yet. Support will be added in a future release."); + } + + if (uses_depth_texture) { + WARN_PRINT_ONCE_ED("Reading from the depth texture is not supported when using the GL Compatibility backend yet. Support will be added in a future release."); + } + + if (uses_normal_texture) { + WARN_PRINT_ONCE_ED("Reading from the normal-roughness texture is only available when using the Forward+ or Mobile rendering backends."); + } +#endif + #if 0 print_line("**compiling shader:"); print_line("**defines:\n"); -- cgit v1.2.3