summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/renderer_storage_rd.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-08-12 03:05:03 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-08-12 18:24:10 +0200
commitfd29432aab63bb988af56e2a9edfb8d16305fc74 (patch)
treed0bb76f9115d6ec1b01b483d9c9b3a5c6743b299 /servers/rendering/renderer_rd/renderer_storage_rd.cpp
parent6f043f7a19337fa0be4c00cc587b5444e922ac6a (diff)
Use nearest mipmaps for both minification and magnification
This is generally the expected behavior when using a nearest + mipmaps mode, as it's often used for pixel art games.
Diffstat (limited to 'servers/rendering/renderer_rd/renderer_storage_rd.cpp')
-rw-r--r--servers/rendering/renderer_rd/renderer_storage_rd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
index 4feaf08808..475f6c475d 100644
--- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
@@ -9129,7 +9129,7 @@ RendererStorageRD::RendererStorageRD() {
} break;
case RS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: {
sampler_state.mag_filter = RD::SAMPLER_FILTER_NEAREST;
- sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR;
+ sampler_state.min_filter = RD::SAMPLER_FILTER_NEAREST;
if (GLOBAL_GET("rendering/textures/default_filters/use_nearest_mipmap_filter")) {
sampler_state.mip_filter = RD::SAMPLER_FILTER_NEAREST;
} else {
@@ -9148,7 +9148,7 @@ RendererStorageRD::RendererStorageRD() {
} break;
case RS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: {
sampler_state.mag_filter = RD::SAMPLER_FILTER_NEAREST;
- sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR;
+ sampler_state.min_filter = RD::SAMPLER_FILTER_NEAREST;
if (GLOBAL_GET("rendering/textures/default_filters/use_nearest_mipmap_filter")) {
sampler_state.mip_filter = RD::SAMPLER_FILTER_NEAREST;
} else {