summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-01-14 12:59:31 -0300
committerJuan Linietsky <reduzio@gmail.com>2019-01-14 12:59:31 -0300
commit81180b266a80799d4744b5f94d9458da90a424ea (patch)
tree6d7b555cdfcb59a62c61060e1f0d77aef65db5ed /scene
parentf4ac678d58bf252b0f74d087ae0427cd3b36f733 (diff)
Hide worldenvironment settings not relevant in GLES2. Fixes #23281
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/environment.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 67757155c5..a57b7bbb42 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -334,6 +334,19 @@ void Environment::_validate_property(PropertyInfo &property) const {
};
+ static const char *high_end_prefixes[] = {
+ "auto_exposure_",
+ "tonemap_",
+ "ss_reflections_",
+ "ssao_",
+ "dof_blur_far_",
+ "dof_blur_near_",
+ "glow_",
+ "adjustment_",
+ NULL
+
+ };
+
const char **prefixes = hide_prefixes;
while (*prefixes) {
String prefix = String(*prefixes);
@@ -346,6 +359,20 @@ void Environment::_validate_property(PropertyInfo &property) const {
prefixes++;
}
+
+ if (VisualServer::get_singleton()->is_low_end()) {
+ prefixes = high_end_prefixes;
+ while (*prefixes) {
+ String prefix = String(*prefixes);
+
+ if (property.name.begins_with(prefix)) {
+ property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL;
+ return;
+ }
+
+ prefixes++;
+ }
+ }
}
void Environment::set_ssr_enabled(bool p_enable) {