Mipmap black texture

Started by kkl, October 24, 2013, 02:12:34 PM

Previous topic - Next topic

kkl

Hi Egon,

I turned mipmap on for 256x128 texture and it turned out a black texture. If mipmap is disabled, the texture is fine. Mipmap also works fine  on 512x512 texture. Any idea what happened exactly?

EgonOlsen

Some drivers do this for non-square textures, which is why jPCT usually prints out a warning in this case. You can try to set Config.internalMipmapCreation=true to see if it helps to bypass the GPU for this, but the best solution would be to use square textures.

kkl

It's still the same when Config.internalMipmapCreation=true. I guess I have to squeeze everything into one square image.

Irony

Can this also happen when I use a texture just for blitting? I have a few GUI elements which are everything but square.

EgonOlsen

If the problem is caused by mipmap usage, then it should not happen when blitting, because blitted textures don't access the mipmaps (unless you are blitting them smaller than they actually are).