16 bits & 32 bits indexed texture modes ?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
hitchhikr
Posts: 83
Joined: Sat Feb 04, 2006 3:33 pm

16 bits & 32 bits indexed texture modes ?

Post by hitchhikr »

Hi,

I fail to see the point behind these 2 texture modes (especially the later one), did i miss something obvious ?
weak
Posts: 114
Joined: Thu Jan 13, 2005 8:31 pm
Location: Vienna, Austria

Re: 16 bits & 32 bits indexed texture modes ?

Post by weak »

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.
hitchhikr
Posts: 83
Joined: Sat Feb 04, 2006 3:33 pm

Post by hitchhikr »

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.
weak
Posts: 114
Joined: Thu Jan 13, 2005 8:31 pm
Location: Vienna, Austria

Post by weak »

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
hitchhikr
Posts: 83
Joined: Sat Feb 04, 2006 3:33 pm

Post by hitchhikr »

Yeah T4 & T8 make perfect sense but GU_PSM_T16 or GU_PSM_T32 nope (at least for me).
weak
Posts: 114
Joined: Thu Jan 13, 2005 8:31 pm
Location: Vienna, Austria

Post by weak »

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)
hitchhikr
Posts: 83
Joined: Sat Feb 04, 2006 3:33 pm

Post by hitchhikr »

Code: Select all

#define 	GU_PSM_5650   &#40;0&#41;
#define 	GU_PSM_5551   &#40;1&#41;
#define 	GU_PSM_4444   &#40;2&#41;
#define 	GU_PSM_8888   &#40;3&#41;
#define 	GU_PSM_T4   &#40;4&#41;
#define 	GU_PSM_T8   &#40;5&#41;
#define 	GU_PSM_T16   &#40;6&#41;
#define 	GU_PSM_T32   &#40;7&#41;
#define 	GU_PSM_DXT1   &#40;8&#41;
#define 	GU_PSM_DXT3   &#40;9&#41;
#define 	GU_PSM_DXT5   &#40;10&#41;
Got this from here and other places aswell:

http://psp.jim.sh/pspsdk-doc/pspgu_8h.html
weak
Posts: 114
Joined: Thu Jan 13, 2005 8:31 pm
Location: Vienna, Austria

Post by weak »

oh, no idea what those could be used four.
ufoz
Posts: 86
Joined: Thu Nov 10, 2005 2:36 am
Location: Tokyo
Contact:

Post by ufoz »

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
Post Reply