www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: zammbi on July 12, 2012, 01:42:42 am

Title: Config.glTrilinear making transparent textures look weird
Post by: zammbi on July 12, 2012, 01:42:42 am
Just letting you know that I tried Config.glTrilinear on the galaxy S2 and it messes up transparent textures.

Without:
(http://i45.tinypic.com/1551kaq.jpg)

With:
(http://i48.tinypic.com/10oehhw.jpg)

Though I guess it might be because glTrilinear isn't ready to be used yet?

P.S: Seems texture colours is 8bit when using OpenGL 2.0 for the S2  ???
Title: Re: Config.glTrilinear making transparent textures look weird
Post by: EgonOlsen on July 12, 2012, 07:15:08 am
I've no influence on the result of trilinear filtering...which color depth have your textures? If it's 16bit (i.e. 4bpp), have you tried to use 32bit instead?

The mali chipsets (on which the S2 and S3 are sadly based on) are rendering pretty inaccurate in the fragment shaders...maybe that causes this effect. You might want to try to set http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Config.html#glDither (http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Config.html#glDither) to true (before creating the FrameBuffer) to see if that helps!?
Title: Re: Config.glTrilinear making transparent textures look weird
Post by: zammbi on July 12, 2012, 07:45:30 am
Quote
I've no influence on the result of trilinear filtering.
Ah ok. Might just leave that option then.

For the S2 it should have the highest of settings on.
I can count the colours on that texture... 7 heh.

I did have glDither on but not before the FrameBuffer. It does help.

Found that replacing:
Code: [Select]
aa = new AAConfigChooser(mGLView, true);with:
Code: [Select]
aa = new AAConfigChooser(mGLView, false);
Improves it a little more. But still really looks 8bit.
Title: Re: Config.glTrilinear making transparent textures look weird
Post by: EgonOlsen on July 12, 2012, 08:35:13 am
Improves it a little more. But still really looks 8bit.
I've no idea why the addition of an alpha channel should improve accuracy in the fragment shader. But i have an idea why i think that Mali chips actually suck somehow. Anyway, you can try the following:

Title: Re: Config.glTrilinear making transparent textures look weird
Post by: zammbi on July 12, 2012, 08:45:57 am
Quote
I've no idea why the addition of an alpha channel should improve accuracy in the fragment shader.
Isn't false turning it off?
Title: Re: Config.glTrilinear making transparent textures look weird
Post by: EgonOlsen on July 12, 2012, 08:49:56 am
Yes, my bad...whatever...it doesn't make much sense either...