From 76c5c89fdc6d8f5786d86617ea9e58077a6a93ca Mon Sep 17 00:00:00 2001 From: Helco Date: Thu, 28 Sep 2023 19:17:23 +0200 Subject: [PATCH] zzre: Fix mipmaps not being used causing flickering --- zzre.core/rendering/VeldridExtensions.cs | 3 ++- zzre/rendering/TextureAssetLoaderExtensions.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zzre.core/rendering/VeldridExtensions.cs b/zzre.core/rendering/VeldridExtensions.cs index 40a80085..62ca6a88 100644 --- a/zzre.core/rendering/VeldridExtensions.cs +++ b/zzre.core/rendering/VeldridExtensions.cs @@ -9,6 +9,7 @@ public static class VeldridExtensions AddressModeU = addressMode, AddressModeV = addressMode, AddressModeW = addressMode, - Filter = filter + Filter = filter, + MaximumLod = 1000 }; } diff --git a/zzre/rendering/TextureAssetLoaderExtensions.cs b/zzre/rendering/TextureAssetLoaderExtensions.cs index 053674ac..cfb58346 100644 --- a/zzre/rendering/TextureAssetLoaderExtensions.cs +++ b/zzre/rendering/TextureAssetLoaderExtensions.cs @@ -46,7 +46,8 @@ public static (Texture, Sampler) LoadTexture(this IAssetLoader loader, { AddressModeU = addressModeU, AddressModeV = ConvertAddressMode(texSection.vAddressingMode, addressModeU), - Filter = ConvertFilterMode(texSection.filterMode) + Filter = ConvertFilterMode(texSection.filterMode), + MaximumLod = 1000 }; var sampler = device.ResourceFactory.CreateSampler(samplerDescription);