| View previous topic :: View next topic |
| Author |
Message |
HexDump
Joined: 07 Jun 2005 Posts: 70
|
Posted: Tue Aug 02, 2005 2:09 am Post subject: 5551 format problems. |
|
|
Hi,
I´m trying to use the 5551 format to draw sprites with alpha test. The PSPSDK doc states that n this format pixels come in a RGBA format, but I have noticed that order must be swaped in order to have correct colors, I mean ABGR, is doc wrong?.
Using this format, I achieved to have correct colors but A channels seemed not work. Any Idea?.
Thanks in advance,
HexDump. |
|
| Back to top |
|
 |
Shito
Joined: 11 May 2005 Posts: 21
|
Posted: Tue Aug 02, 2005 3:40 am Post subject: |
|
|
| From what I've tried, yeah, 5551 RGBA is indeed 1555 ABGR, but I had no problem getting the alpha channel to work, though. |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Tue Aug 02, 2005 4:59 am Post subject: Re: 5551 format problems. |
|
|
It all depends on how you look at it. I've used the order of bits that Sony has used in public, and I think they think of it as going from bit 0 to bit 31 in their naming.
| HexDump wrote: |
Using this format, I achieved to have correct colors but A channels seemed not work. Any Idea?.
|
Make sure you pass GU_TCC_RGBA to the 2nd parameter of sceGuTexMode(), otherwise it won't read the alpha-component. _________________ GE Dominator |
|
| Back to top |
|
 |
Shito
Joined: 11 May 2005 Posts: 21
|
Posted: Tue Aug 02, 2005 5:43 am Post subject: |
|
|
Kinda makes sense, but why is it reversing again in 32 bits then ??
From what I've seen, 32 bits is 8888 ARGB. |
|
| Back to top |
|
 |
HexDump
Joined: 07 Jun 2005 Posts: 70
|
Posted: Tue Aug 02, 2005 6:11 am Post subject: |
|
|
Thanks for the answerings. A little more question to chp, is it really needed to put this format when no using 3D at all?, I´m only writing short ints to VRAM, it sounds odd to me having to set this flag to only do this and get the alpha chan working.
Thanks in advance,
HexDump. |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Tue Aug 02, 2005 3:55 pm Post subject: |
|
|
Yes it's required if you want to use anything that uses the alpha-channel of the texture. Without it, texture alpha will not affect the fragment color, and you'll have a hard time using it for alpha-blending or testing. _________________ GE Dominator |
|
| Back to top |
|
 |
|