From f27402ee44196cd798d20ebd5fd230e290ce7d80 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 18 Jan 2024 16:08:23 +0900 Subject: [PATCH] internal/mipmap: use a better image size Unnecessarily big images were used since 4 years go (f8956941b7b199de61d3addfd4a874ecead52101). Use a better small image for mipmaps. --- internal/mipmap/mipmap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/mipmap/mipmap.go b/internal/mipmap/mipmap.go index cd2341dc3..1e6744b4a 100644 --- a/internal/mipmap/mipmap.go +++ b/internal/mipmap/mipmap.go @@ -170,8 +170,8 @@ func (m *Mipmap) level(level int) *buffered.Image { } is := graphics.QuadIndices() - w2 := sizeForLevel(m.width, level-1) - h2 := sizeForLevel(m.height, level-1) + w2 := sizeForLevel(m.width, level) + h2 := sizeForLevel(m.height, level) if w2 == 0 || h2 == 0 { m.setImg(level, nil) return nil