Original Post
🔒 Locked
BackBuffer Format
Advertisement
With the A8R8G8B8, you have a valid alpha channel. With the X8R8G8B8, the "X" channel is ignored and not accessible to do stuff.
Having an alpha channel in the back buffer allows you to use that channel as a mask for special operation (For example, alpha blending using D3DBLEND_DESTALPHA to only display something where alpha was previously set).
Edit: Mushu, both formats are 32 BPP so I doubt that X8R8G8B8 will take less memory
Having an alpha channel in the back buffer allows you to use that channel as a mask for special operation (For example, alpha blending using D3DBLEND_DESTALPHA to only display something where alpha was previously set).
Edit: Mushu, both formats are 32 BPP so I doubt that X8R8G8B8 will take less memory
Quote:
But backbuffers don't need an alpha channel (since there's no point in storing alpha values)
not quite. your render target (front buffer) doesn't use an alpha, which is why the only allowed D3DFORMATs do not have alpha, but back buffers can and do use alpha. several of the device render states provide different primitive operations you can do using the destination alpha provided by the back buffer.
Quote:
D3DFMT_A8R8G8B8 32-bit ARGB pixel format with alpha, using 8 bits per channel.
D3DFMT_X8R8G8B8 32-bit RGB pixel format, where 8 bits are reserved for each color.
BackBuffer or Display Formats
These formats are the only valid formats for a back buffer or a display.
Format Back buffer Display
A2R10G10B10 x x (full-screen mode only)
A8R8G8B8 x
X8R8G8B8 x x
A1R5G5B5 x
X1R5G5B5 x x
R5G6B5 x x
It seems like D3DFMT_A8R8G8B8 can only be used in the backbuffer... where X8R8G8B8 can work for both...
Quote:
Note that formats are supplied by independent hardware vendors (IHVs) and many FOURCC codes are not listed. The formats in this enumeration are unique in that they are sanctioned by the runtime, meaning that the reference rasterizer will operate on all these types. IHV-supplied formats will be supported by the individual IHVs on a card-by-card basis.
Thats intresting.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement