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 

16 bits & 32 bits indexed texture modes ?

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



Joined: 04 Feb 2006
Posts: 83

PostPosted: Sat May 06, 2006 11:04 pm    Post subject: 16 bits & 32 bits indexed texture modes ? Reply with quote

Hi,

I fail to see the point behind these 2 texture modes (especially the later one), did i miss something obvious ?
Back to top
View user's profile Send private message
weak



Joined: 13 Jan 2005
Posts: 114
Location: Vienna, Austria

PostPosted: Sat May 06, 2006 11:22 pm    Post subject: Re: 16 bits & 32 bits indexed texture modes ? Reply with quote

hitchhikr wrote:

I fail to see the point behind these 2 texture modes (especially the later one), did i miss something obvious ?


indexed 32bit textures for example take only 1/4 of the size (+ max 256*4 bytes palette data) of a regular 32bit texture.
Back to top
View user's profile Send private message
hitchhikr



Joined: 04 Feb 2006
Posts: 83

PostPosted: Sat May 06, 2006 11:27 pm    Post subject: Reply with quote

I thought it was the T8 (8 bits indexed) textures that took 1/4 the size of rgba 32bits textures ?
Apparently, I AM missing something crucial about the inner working of these indexed modes, care to explain this clearly to me ? :D

Basically that's how i see it:

T4 < 4 bits / 16 colors
T8 < 8 bits / 256 colors
T16 < 16 bits / 65536 colors
T32 < 32 bits / 4gigs colors

I thought that the T16 & T32 modes were made to use more than 256 or 65536 colors but they appear like redundants modes with the RGB ones to me.
(I think the modes (clutmodes) of the palette themselves are independants of the resolutions of the indices tables or ?)


Last edited by hitchhikr on Sat May 06, 2006 11:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
weak



Joined: 13 Jan 2005
Posts: 114
Location: Vienna, Austria

PostPosted: Sat May 06, 2006 11:33 pm    Post subject: Reply with quote

as far as i know there are only T4 and T8 for indexed textures.

so with a clut mode of GU_PSM_8888 and a T8 indexed texture, you're using 1byte indices to reference into a 32bit palette. so 1 pixel is represented by 1byte instead of 4...

edit: T8 means 8bits to represent the index, not the color value. the color values come from your palette
Back to top
View user's profile Send private message
hitchhikr



Joined: 04 Feb 2006
Posts: 83

PostPosted: Sat May 06, 2006 11:36 pm    Post subject: Reply with quote

Yeah T4 & T8 make perfect sense but GU_PSM_T16 or GU_PSM_T32 nope (at least for me).
Back to top
View user's profile Send private message
weak



Joined: 13 Jan 2005
Posts: 114
Location: Vienna, Austria

PostPosted: Sat May 06, 2006 11:39 pm    Post subject: Reply with quote

hitchhikr wrote:
Yeah T4 & T8 make perfect sense but GU_PSM_T16 or GU_PSM_T32 nope (at least for me).


maybe my docs are out of date, but i don't see the modes you're talking about (GU_PSM_T16, GU_PSM_T32)
Back to top
View user's profile Send private message
hitchhikr



Joined: 04 Feb 2006
Posts: 83

PostPosted: Sat May 06, 2006 11:41 pm    Post subject: Reply with quote

Code:

#define    GU_PSM_5650   (0)
#define    GU_PSM_5551   (1)
#define    GU_PSM_4444   (2)
#define    GU_PSM_8888   (3)
#define    GU_PSM_T4   (4)
#define    GU_PSM_T8   (5)
#define    GU_PSM_T16   (6)
#define    GU_PSM_T32   (7)
#define    GU_PSM_DXT1   (8)
#define    GU_PSM_DXT3   (9)
#define    GU_PSM_DXT5   (10)


Got this from here and other places aswell:

http://psp.jim.sh/pspsdk-doc/pspgu_8h.html
Back to top
View user's profile Send private message
weak



Joined: 13 Jan 2005
Posts: 114
Location: Vienna, Austria

PostPosted: Sat May 06, 2006 11:45 pm    Post subject: Reply with quote

oh, no idea what those could be used four.
Back to top
View user's profile Send private message
ufoz



Joined: 10 Nov 2005
Posts: 86
Location: Tokyo

PostPosted: Sun May 07, 2006 2:00 pm    Post subject: Reply with quote

Apparently you can specify an offset and a bitmask when setting up your color table, so with a larger palette you could use that for some effects, although I can't really think of anything to use it for. Other people have had trouble getting it to work, though. There's a thread about it somewhere here from a while back.

Edit:
http://forums.ps2dev.org/viewtopic.php?t=4866
http://forums.ps2dev.org/viewtopic.php?t=4941
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
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