mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
ebiten: More precise calculation for mipmap
This commit is contained in:
parent
a0197d4c2f
commit
52a5ea2d44
4
image.go
4
image.go
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user