Archived

This topic is now archived and is closed to further replies.

Drath

D3DFORMAT questions

Recommended Posts

There are many surface formats that are a bit confusing. -What is the point of D3DFMT_X8R8G8B8? Is X intended for storing some different data other than an alpha channel? -What is the luminance in formats such as D3DFMT_L16? -What is the difference between D3DFMT_DXT1 and D3DFMT_DXT5 and is it a good idea to use them? -Is there a list of which formats are supported by hardware vendors? Thanks.

Share this post


Link to post
Share on other sites
In D3DFMT_X8R8G8B8, the X8 bits are unused.

In D3DFMT_L16, the luminance is a 16 bit unsigned integer. 0x0000 maps to 0.0f, 0xffff maps to 1.0f.

D3DFMT_DXT1 compresses to 4 bits per pixel, and contains RGB data. D3DFMT_DXT5 compresses to 8 bits per pixel, and contains RGB and alpha data.

List of formats depends on card and driver. There was a website which listed DX8 caps for many cards. But I forget where it was.

xyzzy

Share this post


Link to post
Share on other sites