Author Topic: Texture color inconsistent  (Read 6793 times)

Offline Mr.Marbles

  • int
  • **
  • Posts: 81
    • View Profile
Texture color inconsistent
« on: February 13, 2006, 02:01:59 pm »
I'm using .gif files to blit this GUI. It looks different in software and hardware mode. For some reason it only renders properly in software mode. In hardware, the colors seem to fade.

Software:


Hardware:


Any idea why this may be happening?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Texture color inconsistent
« Reply #1 on: February 13, 2006, 02:22:54 pm »
What's the size of that texture?

Offline Mr.Marbles

  • int
  • **
  • Posts: 81
    • View Profile
Texture color inconsistent
« Reply #2 on: February 13, 2006, 02:30:47 pm »
I'm using two textures. One with characters/numbers which is 512x128 and the other with lines 512x256. So I'm respecting the 2^X rule, what else can it be  :?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Texture color inconsistent
« Reply #3 on: February 13, 2006, 02:49:16 pm »
Supersampling done by the AA-hardware of the card? Don't know...what graphics card is that?

Edit: What jPCT version are you using?

Offline Mr.Marbles

  • int
  • **
  • Posts: 81
    • View Profile
Texture color inconsistent
« Reply #4 on: February 13, 2006, 02:53:31 pm »
It's an nVidia GeForce2 GTS with 32MB of VRAM. Supersampling? I'll try to turn off the Antialiasing.

Offline Mr.Marbles

  • int
  • **
  • Posts: 81
    • View Profile
Texture color inconsistent
« Reply #5 on: February 13, 2006, 03:07:07 pm »
Didn't work  :(  I tried turning down all the the settings and still no difference

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Texture color inconsistent
« Reply #6 on: February 13, 2006, 04:10:14 pm »
Are you sure that you've disabled AA for OpenGL? And again, which version of jPCT is that? Can you provide me with a test case to reproduce this problem? Does it occur on other hardware too?

Offline Mr.Marbles

  • int
  • **
  • Posts: 81
    • View Profile
Texture color inconsistent
« Reply #7 on: February 13, 2006, 04:45:21 pm »
I've tried it on three different machines with different video cards: nVidia 5200, nVidia Geforce2 GTS, ATi Radeon x300. They all have this color fading problem, but not in the exact same way. What's interesting is that not all regions of the texture has this problem. It seems to only happen when small regions are selected. For example, here's my character/number texture:

The large font shows properly, but the small font does not. So this problem is more apparent with small areas of the texture.

I'm using the latest release of jPCT (v1.09)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Texture color inconsistent
« Reply #8 on: February 13, 2006, 05:09:46 pm »
Please download this version: http://www.jpct.net/download/beta/jpctapi110_pre4.zip
I doubt that it alone will help you, but please do

setGLFiltering(false);
setGLMipmap(false);

on the texture to blit. Let me know if this changes something!

Offline Mr.Marbles

  • int
  • **
  • Posts: 81
    • View Profile
Texture color inconsistent
« Reply #9 on: February 13, 2006, 05:37:09 pm »
Quote
setGLFiltering(false);

This seems to fix the problem although the regions I pick from the texture need to be readjusted, they seem to have changed in size.
Quote
setGLMipmap(false);

This doesn't appear to have any effect.

What do you think was happening?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Texture color inconsistent
« Reply #10 on: February 13, 2006, 06:06:00 pm »
Quote from: "Mr.Marbles"
What do you think was happening?
Seems like some kind of bilinear interpolation is being applied to the blitted text but i can't find a reason for this behaviour nor can i reproduce it. I've tried to blit your texture and parts of it on 3 different systems down to a PII-400/Linux/GF2-MX machine and the blitting looked just fine on all of them.
Is this gif that you've posted exactly the same file that you are using for blitting?
Another try: Can you please check out if setting Config.glFixedBlitting=false; changes anything? In either case, can you provide me with a simple test case that shows the problem on your machine? As said, i can't reproduce it here but without knowing exactly what you are doing, i can't tell if it's my fault or yours or whoever...

Offline Mr.Marbles

  • int
  • **
  • Posts: 81
    • View Profile
Texture color inconsistent
« Reply #11 on: February 13, 2006, 08:02:39 pm »
EgonOlsen,

I've just put together a sample test case which shows this artifact and sent it to your email (hostmaster@jpct.net). Let me know what you think. Thanks.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Texture color inconsistent
« Reply #12 on: February 13, 2006, 08:41:56 pm »
Thanks. You've got mail with a fixed version of the jPCT jar.

Offline Mr.Marbles

  • int
  • **
  • Posts: 81
    • View Profile
Texture color inconsistent
« Reply #13 on: February 14, 2006, 03:10:28 am »
Thanks for the fix  :D

About this new build you sent me, what version of jPCT is it? Is it an addon to the v1.10 pre4 or maybe pre5?? I'm assuming this fix will make it to the next official release but in the mean time I'd just like to track the versions I'm working with so far.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Texture color inconsistent
« Reply #14 on: February 14, 2006, 08:06:32 am »
It's a pre-release of 1.10, so i would call it 1.10pre5 even if it's not available for download. It's about time to get the official 1.10 out of the door...the change log for this version is already longer than it was for any other version lately.