Author Topic: Mipmap black texture  (Read 2188 times)

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Mipmap black texture
« on: October 24, 2013, 02:12:34 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Mipmap black texture
« Reply #1 on: October 24, 2013, 03:32:28 pm »
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.

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Re: Mipmap black texture
« Reply #2 on: October 24, 2013, 04:09:57 pm »
It's still the same when Config.internalMipmapCreation=true. I guess I have to squeeze everything into one square image.

Offline Irony

  • long
  • ***
  • Posts: 151
    • View Profile
Re: Mipmap black texture
« Reply #3 on: October 25, 2013, 10:20:27 am »
Can this also happen when I use a texture just for blitting? I have a few GUI elements which are everything but square.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Mipmap black texture
« Reply #4 on: October 25, 2013, 10:53:45 am »
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).