mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Show warning for GeometryInstance3D transparency in Mobile/Compatibility
This feature is currently only supported when using Forward+.
This commit is contained in:
@@ -194,6 +194,7 @@ Ref<Material> GeometryInstance3D::get_material_overlay() const {
|
||||
void GeometryInstance3D::set_transparency(float p_transparency) {
|
||||
transparency = CLAMP(p_transparency, 0.0f, 1.0f);
|
||||
RS::get_singleton()->instance_geometry_set_transparency(get_instance(), transparency);
|
||||
update_configuration_warnings();
|
||||
}
|
||||
|
||||
float GeometryInstance3D::get_transparency() const {
|
||||
@@ -440,6 +441,14 @@ PackedStringArray GeometryInstance3D::get_configuration_warnings() const {
|
||||
warnings.push_back(RTR("The GeometryInstance3D is configured to fade out smoothly over distance, but the fade transition distance is set to 0.\nTo resolve this, increase Visibility Range End Margin above 0."));
|
||||
}
|
||||
|
||||
if (!Math::is_zero_approx(transparency) && OS::get_singleton()->get_current_rendering_method() != "forward_plus") {
|
||||
warnings.push_back(RTR("GeometryInstance3D transparency is only available when using the Forward+ rendering method."));
|
||||
}
|
||||
|
||||
if ((visibility_range_fade_mode == VISIBILITY_RANGE_FADE_SELF || visibility_range_fade_mode == VISIBILITY_RANGE_FADE_DEPENDENCIES) && OS::get_singleton()->get_current_rendering_method() != "forward_plus") {
|
||||
warnings.push_back(RTR("GeometryInstance3D visibility range transparency fade is only available when using the Forward+ rendering method."));
|
||||
}
|
||||
|
||||
return warnings;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user