Author Topic: Texture error on Adreno GPU  (Read 4810 times)

Offline Irony

  • long
  • ***
  • Posts: 151
    • View Profile
Texture error on Adreno GPU
« on: June 21, 2013, 09:10:39 pm »
Hi, this is how it's supposed to look:


When I move only a little bit away, the texture goes crazy, showing large black spots that jump around and get bigger (it looks worse in motion than on the screenshot)



That happens on the Xperia Z Tablet which has an Adreno 320 GPU. It does not happen on the Note.
Is this some depth buffer issue? Is it that bad on this chip?

It seems to be related to geometry, the more complex the worse, a simple sphere does not show it at all:



Also, the red color banding is quite bad, but this also on the Note and may be related to the screen technology (as far as I know I use 32 bit textures)

Bit disappointed after buying this 500 Euro Gadget only to find that my game looks worse than before :(

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture error on Adreno GPU
« Reply #1 on: June 21, 2013, 09:53:08 pm »
Are you using your own shaders?

Offline Irony

  • long
  • ***
  • Posts: 151
    • View Profile
Re: Texture error on Adreno GPU
« Reply #2 on: June 21, 2013, 09:59:54 pm »
No, just basic stuff, single texture, one light source, no specular lighting

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture error on Adreno GPU
« Reply #3 on: June 21, 2013, 10:06:45 pm »
IF this is related to zbuffer accuracy (which might be, because Adreno sucks at it by default), you can try this:

  • download http://jpct.de/download/beta/jpct_ae.jar
  • enable OpenGL 2.0 (if not already used)
  • set an instance of NVDepthConfigChooser to the GLSurfaceView (or in case you are already using an AAConfigChooser, leave it at that)

like so:

Code: [Select]
mGLView.setEGLConfigChooser(new NVDepthConfigChooser(mGLView, false));


Offline Irony

  • long
  • ***
  • Posts: 151
    • View Profile
Re: Texture error on Adreno GPU
« Reply #4 on: June 21, 2013, 10:07:58 pm »
thx I'll try.. back in a minute

Offline Irony

  • long
  • ***
  • Posts: 151
    • View Profile
Re: Texture error on Adreno GPU
« Reply #5 on: June 21, 2013, 10:22:50 pm »
That did it!!
Also - omfg - no more color banding! <- just found out that was caused by OGL 1.0

Where is the worshipping smiley??
« Last Edit: June 21, 2013, 10:28:59 pm by Irony »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture error on Adreno GPU
« Reply #6 on: June 21, 2013, 10:31:40 pm »
No idea where the banding is gone, but anway.

For the record: What this class actually does is to try to choose a linear depth config on Tegra based devices. If that doesn't work, because you aren't on a Tegra based device (which you are obviously not), it chooses a default config BUT it first tries to do this by using a 24 bit zbuffer. This is only needed on Adreno. Neither PowerVR nor Mali care about it and Tegra even fails if you try to. The name of the class is misleading somehow, but then again you want to use this for Tegra anyway...

Offline Irony

  • long
  • ***
  • Posts: 151
    • View Profile
Re: Texture error on Adreno GPU
« Reply #7 on: June 21, 2013, 10:36:54 pm »
I see. So the 24 bit buffer did the trick then.

Forget what I wrote before about color banding; I think it was actually caused because stupid me used a god-knows-how-old version of JPCT.