| View previous topic :: View next topic |
| Author |
Message |
jsgf
Joined: 12 Jul 2005 Posts: 254
|
Posted: Fri Nov 04, 2005 10:37 am Post subject: Strange Mipmap selection |
|
|
The PSP hardware seems to make very strange mipmap selections; in fact, it seems to depend on the orientation of the texture. Has anyone else seen this?
I have a simple demo which draws a ground plane which spins around. From some viewpoints, the mipmap selection is as you'd expect (using levels 2-6), but as it turns it ends up using levels 0-2 for the whole plane. Not only does this mean that the appearance changes as the camera turns, but there's a large, obvious framerate slowdown.
I'm not swizzling my textures, which will be the next thing to try; maybe the PSP's mipmap selection depends on the stride through texture memory.
But I'm really wondering if this has to do with the other mipmap LOD-looking registers, like bits 8-15 in TexMode (#194) or the texture slope register. Has anyone experimented with these?
I've put my test program up at http://www.goop.org/psp/gl/mipmap-test.zip so you can see what I'm talking about (don't worry about the stripes in the sky; I think that's just an incorrect max-mipmap level for that texture). Circle pauses, triangle turns of mipmaps, X exits. |
|
| Back to top |
|
 |
ector
Joined: 12 May 2005 Posts: 195
|
Posted: Fri Nov 04, 2005 12:02 pm Post subject: |
|
|
Weird, I'll have to try this later.
Swizzling shouldn't affect mipmap selection, but WILL give you a big speedup. _________________ http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come. |
|
| Back to top |
|
 |
jsgf
Joined: 12 Jul 2005 Posts: 254
|
Posted: Sat Nov 05, 2005 9:09 am Post subject: |
|
|
Yeah, swizzling makes no difference to mipmap selection, though it does remove the variable speed.
I tried playing with the texmode bits 8-15, and the texture slope, but I didn't see any obvious effect - certainly no improvement.
I just noticed the texture level bias setting; I'll give it a tweak, though I don't think it should have any effect.
The range of angles which cause the problem seem quite narrow (~10 deg?). I wonder if its just a hardware bug? |
|
| Back to top |
|
 |
dankydoo
Joined: 29 Mar 2005 Posts: 11
|
Posted: Sat Nov 05, 2005 11:20 am Post subject: |
|
|
The game burnout does this too when you are doing 'crash' mode. The camera will zoom in on your car, and it continuously swaps mip-maps for the ground back and forth. It's very strange, I always wondered why the wouldn't have fixed such an obvious bug, maybe it is hardware....
dankydoo |
|
| Back to top |
|
 |
jsgf
Joined: 12 Jul 2005 Posts: 254
|
Posted: Sat Nov 05, 2005 11:34 am Post subject: |
|
|
| Huh, sounds like it. Could you download my test program (linked to above) and tell me if it looks similar? |
|
| Back to top |
|
 |
ector
Joined: 12 May 2005 Posts: 195
|
|
| Back to top |
|
 |
Blackrider
Joined: 29 Mar 2006 Posts: 8
|
Posted: Wed Mar 29, 2006 1:38 pm Post subject: |
|
|
I'm having the exact same problem, I can't get rid of it. I don't buy the theory that it's a hardware bug, as it seems to work in some games but not for others.
As some time has passed, since this was first written, has anyone found any solution or if it is a bug how should I work around it? |
|
| Back to top |
|
 |
jsgf
Joined: 12 Jul 2005 Posts: 254
|
Posted: Thu Mar 30, 2006 5:29 am Post subject: |
|
|
I think it is a hardware bug, simply because I can't think of any good reason for it to behave in the way it does. If it hits some games and not others, take that to mean that it happens with some combinations of state and not others. I haven't managed to find a way to avoid the problem.
It's possible that developers are working around it by using manual texture LOD rather than automatic. I haven't tried that yet. |
|
| Back to top |
|
 |
|