diff options
Diffstat (limited to 'scene/3d/gi_probe.cpp')
-rw-r--r-- | scene/3d/gi_probe.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 65a330ddc0..0ba1b3d984 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -212,7 +212,6 @@ bool GIProbeData::is_using_two_bounces() const { } RID GIProbeData::get_rid() const { - return probe; } @@ -283,7 +282,6 @@ void GIProbeData::_bind_methods() { } GIProbeData::GIProbeData() { - ao = 0.0; ao_size = 0.5; dynamic_range = 4; @@ -299,7 +297,6 @@ GIProbeData::GIProbeData() { } GIProbeData::~GIProbeData() { - RS::get_singleton()->free(probe); } @@ -307,7 +304,6 @@ GIProbeData::~GIProbeData() { ////////////////////// void GIProbe::set_probe_data(const Ref<GIProbeData> &p_data) { - if (p_data.is_valid()) { RS::get_singleton()->instance_set_base(get_instance(), p_data->get_rid()); } else { @@ -318,41 +314,34 @@ void GIProbe::set_probe_data(const Ref<GIProbeData> &p_data) { } Ref<GIProbeData> GIProbe::get_probe_data() const { - return probe_data; } void GIProbe::set_subdiv(Subdiv p_subdiv) { - ERR_FAIL_INDEX(p_subdiv, SUBDIV_MAX); subdiv = p_subdiv; update_gizmo(); } GIProbe::Subdiv GIProbe::get_subdiv() const { - return subdiv; } void GIProbe::set_extents(const Vector3 &p_extents) { - extents = p_extents; update_gizmo(); _change_notify("extents"); } Vector3 GIProbe::get_extents() const { - return extents; } void GIProbe::_find_meshes(Node *p_at_node, List<PlotMesh> &plot_meshes) { - MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(p_at_node); if (mi && mi->get_gi_mode() == GeometryInstance3D::GI_MODE_BAKED && mi->is_visible_in_tree()) { Ref<Mesh> mesh = mi->get_mesh(); if (mesh.is_valid()) { - AABB aabb = mesh->get_aabb(); Transform xf = get_global_transform().affine_inverse() * mi->get_global_transform(); @@ -372,12 +361,9 @@ void GIProbe::_find_meshes(Node *p_at_node, List<PlotMesh> &plot_meshes) { Node3D *s = Object::cast_to<Node3D>(p_at_node); if (s) { - if (s->is_visible_in_tree()) { - Array meshes = p_at_node->call("get_meshes"); for (int i = 0; i < meshes.size(); i += 2) { - Transform mxf = meshes[i]; Ref<Mesh> mesh = meshes[i + 1]; if (!mesh.is_valid()) @@ -416,7 +402,6 @@ Vector3i GIProbe::get_estimated_cell_size() const { axis_cell_size[longest_axis] = 1 << cell_subdiv; for (int i = 0; i < 3; i++) { - if (i == longest_axis) continue; @@ -433,7 +418,6 @@ Vector3i GIProbe::get_estimated_cell_size() const { return Vector3i(axis_cell_size[0], axis_cell_size[1], axis_cell_size[2]); } void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) { - static const int subdiv_value[SUBDIV_MAX] = { 6, 7, 8, 9 }; Voxelizer baker; @@ -451,7 +435,6 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) { int pmc = 0; for (List<PlotMesh>::Element *E = mesh_list.front(); E; E = E->next()) { - if (bake_step_function) { bake_step_function(pmc, RTR("Plotting Meshes") + " " + itos(pmc) + "/" + itos(mesh_list.size())); } @@ -483,7 +466,6 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) { #endif } else { - Ref<GIProbeData> probe_data = get_probe_data(); if (probe_data.is_null()) @@ -511,22 +493,18 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) { } void GIProbe::_debug_bake() { - bake(nullptr, true); } AABB GIProbe::get_aabb() const { - return AABB(-extents, extents * 2); } Vector<Face3> GIProbe::get_faces(uint32_t p_usage_flags) const { - return Vector<Face3>(); } String GIProbe::get_configuration_warning() const { - if (RenderingServer::get_singleton()->is_low_end()) { return TTR("GIProbes are not supported by the GLES2 video driver.\nUse a BakedLightmap instead."); } @@ -534,7 +512,6 @@ String GIProbe::get_configuration_warning() const { } void GIProbe::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_probe_data", "data"), &GIProbe::set_probe_data); ClassDB::bind_method(D_METHOD("get_probe_data"), &GIProbe::get_probe_data); @@ -560,7 +537,6 @@ void GIProbe::_bind_methods() { } GIProbe::GIProbe() { - subdiv = SUBDIV_128; extents = Vector3(10, 10, 10); |