forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Strange Mipmap selection

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Fri Nov 04, 2005 10:37 am    Post subject: Strange Mipmap selection Reply with quote

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
View user's profile Send private message Visit poster's website
ector



Joined: 12 May 2005
Posts: 195

PostPosted: Fri Nov 04, 2005 12:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Sat Nov 05, 2005 9:09 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dankydoo



Joined: 29 Mar 2005
Posts: 11

PostPosted: Sat Nov 05, 2005 11:20 am    Post subject: Reply with quote

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
View user's profile Send private message
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Sat Nov 05, 2005 11:34 am    Post subject: Reply with quote

Huh, sounds like it. Could you download my test program (linked to above) and tell me if it looks similar?
Back to top
View user's profile Send private message Visit poster's website
ector



Joined: 12 May 2005
Posts: 195

PostPosted: Sat Nov 05, 2005 2:58 pm    Post subject: Reply with quote

Yep, looks like a hardware bug, and similar to what can happen in burnout.
_________________
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
Back to top
View user's profile Send private message
Blackrider



Joined: 29 Mar 2006
Posts: 8

PostPosted: Wed Mar 29, 2006 1:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Thu Mar 30, 2006 5:29 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group