From bc3cf3082480ab592f3cf2e77823fcd177b4ef89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tur=C3=A1nszki=20J=C3=A1nos?= Date: Sat, 22 Feb 2025 12:36:47 +0100 Subject: [PATCH] BC4 texture import: reswizzle to rrr1 --- WickedEngine/wiResourceManager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/WickedEngine/wiResourceManager.cpp b/WickedEngine/wiResourceManager.cpp index eae9d41163..df9e0f583f 100644 --- a/WickedEngine/wiResourceManager.cpp +++ b/WickedEngine/wiResourceManager.cpp @@ -703,7 +703,14 @@ namespace wi break; } - if (desc.format == Format::BC5_UNORM) + if (desc.format == Format::BC4_UNORM || desc.format == Format::BC4_SNORM) + { + desc.swizzle.r = ComponentSwizzle::R; + desc.swizzle.g = ComponentSwizzle::R; + desc.swizzle.b = ComponentSwizzle::R; + desc.swizzle.a = ComponentSwizzle::ONE; + } + if (desc.format == Format::BC5_UNORM || desc.format == Format::BC5_SNORM) { desc.swizzle.r = ComponentSwizzle::R; desc.swizzle.g = ComponentSwizzle::G;