mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-13 22:47:26 +01:00
ebiten: bug fix: canSkipMipmap didn't work with negative scaling
This just means that an optimization didn't work, so this issue should not be so serious.
This commit is contained in:
parent
2f5ca1af83
commit
5fd619eea7
3
image.go
3
image.go
@ -18,6 +18,7 @@ import (
|
||||
"fmt"
|
||||
"image"
|
||||
"image/color"
|
||||
"math"
|
||||
"unsafe"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/v2/internal/affine"
|
||||
@ -106,7 +107,7 @@ func canSkipMipmap(geom GeoM, filter builtinshader.Filter) bool {
|
||||
if filter != builtinshader.FilterLinear {
|
||||
return true
|
||||
}
|
||||
return geom.det2x2() >= 0.999
|
||||
return math.Abs(geom.det2x2()) >= 0.999
|
||||
}
|
||||
|
||||
// DrawImageOptions represents options for DrawImage.
|
||||
|
Loading…
Reference in New Issue
Block a user