From 150c8d1333199d5137eb18b20a0fd7d61485e765 Mon Sep 17 00:00:00 2001 From: seker <04070628@163.com> Date: Fri, 13 Dec 2024 16:51:56 +0800 Subject: [PATCH] Fix If the width of the image is not a multiple of 4, the rendering result by image_view will be skewed. (#8166) --- samples/image_viewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/image_viewer.cpp b/samples/image_viewer.cpp index d380aae41128..17c5d400bc54 100644 --- a/samples/image_viewer.cpp +++ b/samples/image_viewer.cpp @@ -246,7 +246,7 @@ static void loadImage(App& app, Engine* engine, const Path& filename) { .height(h) .levels(0xff) .format(channels == 3 ? - Texture::InternalFormat::RGB16F : Texture::InternalFormat::RGBA16F) + Texture::InternalFormat::RGB16F : Texture::InternalFormat::RGBA32F) .sampler(Texture::Sampler::SAMPLER_2D) .build(*engine);