mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Sort decals and lights based on camera origin
Also implement sort_offset for decals Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
This commit is contained in:
@@ -120,6 +120,12 @@ bool VisualInstance3D::is_sorting_use_aabb_center() const {
|
||||
return sorting_use_aabb_center;
|
||||
}
|
||||
|
||||
void VisualInstance3D::_validate_property(PropertyInfo &p_property) const {
|
||||
if (p_property.name == "sorting_offset" || p_property.name == "sorting_use_aabb_center") {
|
||||
p_property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
void VisualInstance3D::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_base", "base"), &VisualInstance3D::set_base);
|
||||
ClassDB::bind_method(D_METHOD("get_base"), &VisualInstance3D::get_base);
|
||||
@@ -437,6 +443,12 @@ PackedStringArray GeometryInstance3D::get_configuration_warnings() const {
|
||||
return warnings;
|
||||
}
|
||||
|
||||
void GeometryInstance3D::_validate_property(PropertyInfo &p_property) const {
|
||||
if (p_property.name == "sorting_offset" || p_property.name == "sorting_use_aabb_center") {
|
||||
p_property.usage = PROPERTY_USAGE_DEFAULT;
|
||||
}
|
||||
}
|
||||
|
||||
void GeometryInstance3D::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_material_override", "material"), &GeometryInstance3D::set_material_override);
|
||||
ClassDB::bind_method(D_METHOD("get_material_override"), &GeometryInstance3D::get_material_override);
|
||||
|
||||
Reference in New Issue
Block a user