diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-04-30 10:03:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-30 10:03:10 +0200 |
commit | deddf9c4f8135bd99b95a0a99788131cb6d5a0b0 (patch) | |
tree | 7b4d130d38500c6fc1957ceb9c453c8656bbfa55 /editor/plugins/node_3d_editor_plugin.cpp | |
parent | a6e3c84c68c0d60430afef6694551526453ecd4c (diff) | |
parent | 87ba4daf4bd627af033b4fbd784f783d9c58988b (diff) |
Merge pull request #38344 from ExpiredPopsicle/culling5_master
Fixed false positives in the culling system (master branch version).
Diffstat (limited to 'editor/plugins/node_3d_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 17eaa06d57..723898ba6a 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -674,17 +674,13 @@ void Node3DEditorViewport::_select_region() { } } - if (!orthogonal) { - Plane near(cam_pos, -_get_camera_normal()); - near.d -= get_znear(); + Plane near(cam_pos, -_get_camera_normal()); + near.d -= get_znear(); + frustum.push_back(near); - frustum.push_back(near); - - Plane far = -near; - far.d += get_zfar(); - - frustum.push_back(far); - } + Plane far = -near; + far.d += get_zfar(); + frustum.push_back(far); Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_convex(frustum, get_tree()->get_root()->get_world()->get_scenario()); Vector<Node *> selected; |