mirror of
https://github.com/godotengine/godot.git
synced 2025-10-27 11:44:21 +00:00
Merge pull request #37863 from ExpiredPopsicle/culling5
Fixed false positives in the culling system.
This commit is contained in:
commit
8d93303483
9 changed files with 95 additions and 25 deletions
|
|
@ -669,17 +669,13 @@ void SpatialEditorViewport::_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 = VisualServer::get_singleton()->instances_cull_convex(frustum, get_tree()->get_root()->get_world()->get_scenario());
|
||||
Vector<Node *> selected;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue