summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-07-04 23:52:23 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-07-04 23:53:08 -0300
commit7263137dba86cd308afc2016fafcb2793c3d9073 (patch)
tree16e85fc7a837409c7284b1a620f76f4362efa911 /scene
parentd84ed525a9b603c157abab1c67f8ac34d6d4675c (diff)
Implemented environment arrays for skybox reflection and roughness, quality increase is enormous.
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/mesh_instance.cpp13
-rw-r--r--scene/resources/environment.cpp2
2 files changed, 8 insertions, 7 deletions
diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp
index 14886f4b7a..62e1a95209 100644
--- a/scene/3d/mesh_instance.cpp
+++ b/scene/3d/mesh_instance.cpp
@@ -340,12 +340,13 @@ void MeshInstance::create_debug_tagents() {
mi->set_mesh(am);
mi->set_name("DebugTangents");
add_child(mi);
- if (get_parent()) {
- if (get_parent() == get_tree()->get_edited_scene_root())
- mi->set_owner(get_parent());
- else
- mi->set_owner(get_parent()->get_owner());
- }
+#ifdef TOOLS_ENABLED
+
+ if (this == get_tree()->get_edited_scene_root())
+ mi->set_owner(this);
+ else
+ mi->set_owner(get_owner());
+#endif
}
}
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 24e3977de8..b9dc428c2d 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -818,7 +818,7 @@ float Environment::get_fog_height_curve() const {
void Environment::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_background", "mode"), &Environment::set_background);
- ClassDB::bind_method(D_METHOD("set_sky", "sky:CubeMap"), &Environment::set_sky);
+ ClassDB::bind_method(D_METHOD("set_sky", "sky:Sky"), &Environment::set_sky);
ClassDB::bind_method(D_METHOD("set_sky_scale", "scale"), &Environment::set_sky_scale);
ClassDB::bind_method(D_METHOD("set_bg_color", "color"), &Environment::set_bg_color);
ClassDB::bind_method(D_METHOD("set_bg_energy", "energy"), &Environment::set_bg_energy);