A8R8G8B8 or X8R8G8B8?

Started by
2 comments, last by Endurion 16 years, 12 months ago
I keep reading the documentation over and over but I can't understand what's the difference between A8R8G8B8 & X8R8G8B8..
Advertisement
If the format is for a texture or surface this means that the A8R8G8B8 format can have alpha values inside. Useful for color keying and blending.

Whereas X8R8G8B8 uses the same amount of memory, but 25% stay unused.

For a backbuffer this doesn't make any difference.


Notice: 25% unused may sound harsh, but it means a pixel is 32bit which fits todays architecture way better than 24bit. Most cards don't offer any 24bit acceleration nor the display modes for it.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

Quote:For a backbuffer this doesn't make any difference.
I don't like to nit-pick, but you mean front buffer, right? [smile]

An alpha channel in the render-target/backbuffer allows the use of destination alpha during blend-op's. However this is all resolved in the front-buffer such that alpha isn't of any use anymore...

Check out the D3DFORMAT documentation for details - A8R8G8B8 is valid for back buffers, but not for front buffers.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Oopsie, i consider my nit picked :)

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

This topic is closed to new replies.

Advertisement