From 49b3ff04cef68c5d2174b1f1bfd4820b18cf01d8 Mon Sep 17 00:00:00 2001 From: assiduous Date: Wed, 21 Oct 2020 11:06:45 -0700 Subject: Another minor fix to mipmap generation --- TextureLoader/src/TextureLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'TextureLoader/src/TextureLoader.cpp') diff --git a/TextureLoader/src/TextureLoader.cpp b/TextureLoader/src/TextureLoader.cpp index 9783058..999070a 100644 --- a/TextureLoader/src/TextureLoader.cpp +++ b/TextureLoader/src/TextureLoader.cpp @@ -87,7 +87,7 @@ template ChannelType LinearAverage(ChannelType c0, ChannelType c1, ChannelType c2, ChannelType c3) { static_assert(std::numeric_limits::is_integer && !std::numeric_limits::is_signed, "Unsigned integers are expected"); - return static_cast(static_cast(c0) + static_cast(c1) + static_cast(c2) + static_cast(c3)) / 4; + return static_cast((static_cast(c0) + static_cast(c1) + static_cast(c2) + static_cast(c3)) / 4); } template -- cgit v1.2.3