Enable nearest filtering in shrunk 3D viewport

This commit is contained in:
kobewi 2022-06-05 18:24:05 +02:00
parent 3279fc7747
commit 6ac85ccc3d

View File

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