Merge pull request #61725 from KoBeWi/one_line_that_changed_the_world

Enable nearest filtering in shrunk 3D viewport
This commit is contained in:
Rémi Verschelde 2022-06-05 20:55:06 +02:00 committed by GitHub
commit e8de154d2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -414,6 +414,7 @@ void Node3DEditorViewport::cancel_transform() {
void Node3DEditorViewport::_update_shrink() {
bool shrink = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_HALF_RESOLUTION));
subviewport_container->set_stretch_shrink(shrink ? 2 : 1);
subviewport_container->set_texture_filter(shrink ? TEXTURE_FILTER_NEAREST : TEXTURE_FILTER_PARENT_NODE);
}
float Node3DEditorViewport::get_znear() const {