summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/forward_mobile
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2023-02-25 16:24:41 -0800
committerclayjohn <claynjohn@gmail.com>2023-02-26 12:28:02 -0800
commitc69b14e96e3191622c06aa1e98c7f15f1fc895d4 (patch)
tree59ea6fe8dd90524515103038b117cf1c2a0902c5 /servers/rendering/renderer_rd/forward_mobile
parent84a80721c5308df36c7295949c76a622c5e0edb9 (diff)
Add warnings for unsupported features in mobile and gl_compatibility backends
Diffstat (limited to 'servers/rendering/renderer_rd/forward_mobile')
-rw-r--r--servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
index 0e992eb965..453cad5271 100644
--- a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
+++ b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
@@ -114,8 +114,8 @@ void SceneShaderForwardMobile::ShaderData::set_code(const String &p_code) {
actions.usage_flag_pointers["ALPHA_TEXTURE_COORDINATE"] = &uses_alpha_antialiasing;
actions.render_mode_flags["depth_prepass_alpha"] = &uses_depth_prepass_alpha;
- // actions.usage_flag_pointers["SSS_STRENGTH"] = &uses_sss;
- // actions.usage_flag_pointers["SSS_TRANSMITTANCE_DEPTH"] = &uses_transmittance;
+ actions.usage_flag_pointers["SSS_STRENGTH"] = &uses_sss;
+ actions.usage_flag_pointers["SSS_TRANSMITTANCE_DEPTH"] = &uses_transmittance;
actions.usage_flag_pointers["DISCARD"] = &uses_discard;
actions.usage_flag_pointers["TIME"] = &uses_time;
@@ -150,6 +150,16 @@ void SceneShaderForwardMobile::ShaderData::set_code(const String &p_code) {
uses_depth_texture = gen_code.uses_depth_texture;
uses_normal_texture = gen_code.uses_normal_roughness_texture;
+#ifdef DEBUG_ENABLED
+ 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.");
+ }
+#endif
+
#if 0
print_line("**compiling shader:");
print_line("**defines:\n");