grazie Mario, verifico
I have spend time to test, but although the filter name is read from atlas file, then it is not applied anywhere. May be because I use FNA/Monogame.
ok it's not very important, if I see the need I will implement the code and publish it
ok after 2 year I'm using mipmap 😃
it easy, after create a texture with mipmap I substiture in the Atlas
atlas.Pages(0).rendererObject(0)=texture_with_mipmap
for create mipmap I use this code
Function CreateMipMap( texture As Texture2D) as Texture2D
Dim newTexture As Texture2D = New Texture2D(Game1.graphics.GraphicsDevice, texture.Width, texture.Height, True, SurfaceFormat.Color)
For i As Integer = 0 To newTexture.LevelCount - 1
Dim temptext As Texture2D
Using fileIn As IO.Stream = TitleContainer.OpenStream(texture.Name)
temptext = Texture2D.FromStream(graphics.GraphicsDevice, fileIn, texture.Width / CInt(Math.Pow(2, i)), texture.Height / CInt(Math.Pow(2, i)), False)
Dim size As Integer = (texture.Width / CInt(Math.Pow(2, i))) * (texture.Height / CInt(Math.Pow(2, i)))
Dim data As Color()
data = New Color(size - 1) {}
temptext.GetData(data, 0, size)
newTexture.SetData(i, Nothing, data, 0, size)
End Using
Next
return newTexture
End Sub
update
Function CreateMipMap( texture As Texture2D,texturepath as string) as Texture2D
Dim newTexture As Texture2D = New Texture2D(Game1.graphics.GraphicsDevice, texture.Width, texture.Height, True, SurfaceFormat.Color)
For i As Integer = 0 To newTexture.LevelCount - 1
fileIn.Position = 0
Dim temptext As Texture2D
Using fileIn As IO.Stream = TitleContainer.OpenStream(texturepath)
temptext = Texture2D.FromStream(graphics.GraphicsDevice, fileIn, texture.Width / CInt(Math.Pow(2, i)), texture.Height / CInt(Math.Pow(2, i)), False)
Dim size As Integer = (texture.Width / CInt(Math.Pow(2, i))) * (texture.Height / CInt(Math.Pow(2, i)))
Dim data As Color()
data = New Color(size - 1) {}
temptext.GetData(data, 0, size)
newTexture.SetData(i, Nothing, data, 0, size)
End Using
Next
return newTexture
End Sub