diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-09-28 20:32:40 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-09-28 20:33:18 -0300 |
commit | c83742ba86eadd03800369c3fb5b1c23f083c59e (patch) | |
tree | 3d5d27e0b2f661d01fe472af82b49b65d331120d /scene/resources/material.cpp | |
parent | 4db2db2d6b4cf82c19f4ea96258071f5682dd592 (diff) | |
download | redot-engine-c83742ba86eadd03800369c3fb5b1c23f083c59e.tar.gz |
-Lightmap and lightmap capture support for GLES2
-Added hint to not show some properties when running on low end gfx
Diffstat (limited to 'scene/resources/material.cpp')
-rw-r--r-- | scene/resources/material.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index ce801c8763..c898aaff34 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -1369,6 +1369,12 @@ void SpatialMaterial::_validate_feature(const String &text, Feature feature, Pro } } +void SpatialMaterial::_validate_high_end(const String &text, PropertyInfo &property) const { + if (property.name.begins_with(text)) { + property.usage |= PROPERTY_USAGE_HIGH_END_GFX; + } +} + void SpatialMaterial::_validate_property(PropertyInfo &property) const { _validate_feature("normal", FEATURE_NORMAL_MAPPING, property); _validate_feature("emission", FEATURE_EMISSION, property); @@ -1382,6 +1388,12 @@ void SpatialMaterial::_validate_property(PropertyInfo &property) const { _validate_feature("refraction", FEATURE_REFRACTION, property); _validate_feature("detail", FEATURE_DETAIL, property); + _validate_high_end("refraction", property); + _validate_high_end("subsurf_scatter", property); + _validate_high_end("anisotropy", property); + _validate_high_end("clearcoat", property); + _validate_high_end("depth", property); + if (property.name.begins_with("particles_anim_") && billboard_mode != BILLBOARD_PARTICLES) { property.usage = 0; } |