Texture color inconsistent

Started by Mr.Marbles, February 13, 2006, 02:01:59 PM

Previous topic - Next topic

Mr.Marbles

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?

EgonOlsen

What's the size of that texture?

Mr.Marbles

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  :?

EgonOlsen

Supersampling done by the AA-hardware of the card? Don't know...what graphics card is that?

Edit: What jPCT version are you using?

Mr.Marbles

It's an nVidia GeForce2 GTS with 32MB of VRAM. Supersampling? I'll try to turn off the Antialiasing.

Mr.Marbles

Didn't work  :(  I tried turning down all the the settings and still no difference

EgonOlsen

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?

Mr.Marbles

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)

EgonOlsen

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!

Mr.Marbles

QuotesetGLFiltering(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.
QuotesetGLMipmap(false);
This doesn't appear to have any effect.

What do you think was happening?

EgonOlsen

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...

Mr.Marbles

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.

EgonOlsen

Thanks. You've got mail with a fixed version of the jPCT jar.

Mr.Marbles

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.

EgonOlsen

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.