MipMaps causing lag [Solved]

I’m writing a voxel minecraft like game and use texturearrays for my tesselated meshs’ texture to prevent texture bleeding in the mipmaps.

I use so called “sectors” to split the terrain in 32x128x32 parts - each part consists of at least one geometry object representing the voxel terrain. Each of these objects get a material that points to that same texturearray.

Still in the game I get a big lag and with it a massive FPS drop due to what I figured must be the mipmap generation for each sector - after a few seconds it disappears but reappears again if more sectors becoma visible. So if I disable mipmapping by


the problem disappears completely. My question now is: is there a way to stop it from generating the same mipmaps over and over again? Some kind of pregeneration? Or is this even a desired behaviour? Or a bug?

Ha - never mind - just saw I forgot to push the textureArray to the cache - so there was always a new textureArray for each sector and with it a new mipmaps was generated - my bad :wink: