ebiten: More precise calculation for mipmap

This commit is contained in:
Hajime Hoshi 2020-07-26 18:41:59 +09:00
parent a0197d4c2f
commit 52a5ea2d44

View File

@ -95,10 +95,10 @@ func (i *Image) Fill(clr color.Color) error {
func canSkipMipmap(geom GeoM, filter driver.Filter) bool {
det := geom.det2x2()
if filter == driver.FilterNearest && det <= 1.1 {
if filter == driver.FilterNearest && det <= 1.001 {
return true
}
if filter == driver.FilterLinear && det >= 0.9 {
if filter == driver.FilterLinear && det >= 0.999 {
return true
}
return false