Jump to content
  • Advertisement
Sign in to follow this  

Video modes listed in DirectX Caps Viewer

This topic is 4924 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was looking through caps viewer and noticed that direct3d doesn't implement some of the video modes that ddraw has. There are no 8 bit modes listed under d3d. Why aren't there any 8 bit modes in d3d?

Share this post

Link to post
Share on other sites
No 8 bit modes? On which card? I guess it's possible. I hate the current level of support of 8 bit modes, though that's based solely on the card I have, which is a GeForce3.

For example on a GeForce3:

DX8 caps viewer:
P8 is only 8 bit mode (can be used to simulate A8 or L8, or AL8)
A8R8G8B8 is smallest mode with actual A8.

DX9 caps viewer:
L8 is only 8 bit mode (you could DP3 it to hack getting an A8)
A8L8 is smallest mode with A8.

Despite P8 being a valid DX9 mode, and despite the fact the card supports it in DX8, it's gone in DX9. I used to use P8 to get greyscales and alphas. It was a cheap workaround to there being no A8 or L8 modes. In DX9 though, while we get 8bit grey, we don't get an 8bit alpha, and we lose our method of faking it.

I'm really surprised at the complete lack of an A8 mode. I'm also surprised that they've neglected some small memory formats like a 4 bit, 2 bit, or 1 bit... sure they're no good for photos, but they've got uses, like fonts, masks, and the like.

Share this post

Link to post
Share on other sites
I'm using a similiar card: NVIDIA GeForce FX Go5200

Here is the output from dx8.1 caps viewer: Not sure why it doesn't show up, but if you click on it, it will show up.

[Edited by - boolean010 on November 25, 2004 4:57:25 PM]

Share this post

Link to post
Share on other sites
I am new to dx and d3d. So I dont understand some of the terms in your post. I was thinking more about display modes, where you would be able to use the features of d3d in a 8 bit display mode ( like mode 13h in dos ). I was thinking if you wanted to make a simple 3d app, then it would be faster because less memory is being used. You can probably tell that I'm new. Anyways, I looked up some of the terms.

P8, A8, L8 and AL8 are unsigned formats used to describe surfaces.

surface --- Memory that represents visual images. This is often display memory but it can also be system memory. See also "complex surface," "off-screen surface," "overlay surface," and "primary surface."

Unsigned Formats
Data in an unsigned format must be positive. Unsigned formats use combinations of (R)ed, (G)reen, (B)lue, (A)lpha, (L)uminance, and (P)alette data. Palette data is also referred to as color indexed data because the data is used to index a color palette.

D3DFMT_A8 8-bit alpha only.
D3DFMT_P8 8-bit color indexed.
D3DFMT_L8 8-bit luminance only.
D3DFMT_A8L8 16-bit using 8 bits each for alpha and luminance

L8 is only 8 bit mode (you could DP3 it to hack getting an A8) ---- I recognize the dp3 stuff because I remember seeing it in shaderx. I think it is to do with computing the dot product in vertex/pixel shaders. But as far as ShaderX is concerned I'll have to wait until I know more about dx/d3d. I just started reading chapter 5 ( Getting Direct3D Up and running ) of direct3d programming: kick start.

Share this post

Link to post
Share on other sites
I have no problem with D3D not support an 8 bit render target. To do it well it would need a higher color temporary buffer, and then use something like error diffusion dithering between available colors in the palette. I suppose if you want to do 2D using quads as sprites, it could be useful. For actual 3D work though, I don't see a point. Even for 2D, these days you'd likely want more colors in your final image.

I was thinking more of texture formats, not display formats. You may have some 8 bit texture formats on your card, but as my post tries to point out, you don't necessarily get the formats you'd like (I can't fathom why hardware was designed without A8 support, honestly)... nor can you expect a fairly mainstream card to support a majority of the smaller bit per pixel modes, and even then, it seems arbitrarily chosen. A mode supported in DX8, but not DX9? But if the hardware is capable of it, and the driver has to support it for DX8, why not in DX9? Especially when it's the mode that can make up for the lack of other 8 bit modes.

I would have expected A8 support ever since multitexturing became available... but maybe that's just me.

Anyway, if it helps you any, here's where the formats are useful:

A8 - alpha. Used to control how to blend between textures and/or the frame buffer. 256 levels of transparency.

L8 - luminance. Basically red=green=blue=luminance. Grayscale images. Useful for masks, and intensity maps too.

P8 - paletted. This is like Mode 13 and SVGA. You define 256 different 24 or 32-bit colors, and this holds the index to which color to use. A space saving method of holding images with less than 257 colors. By setting the color and alpha like so, "color.r = color.g = color.b = color.a = i", we can fake A8 and L8 modes.

A8L8 - grey and alpha. You may have a need for two 8 bit values, which makes this a handy mode to have supported. What I dislike is that this is the cheapest mode my card supports with 8 bit of alpha... if I want a pure alpha texture, the best I can do is to use this mode, and waste the other 50% of video memory... or try to pack some other unrelated texture into the other half of the texture.


the dp3 comment... it's probably beyond you right now, but I'll explain it for the sake of others.

In a shader you can use blue replicate to get the value from an L8 texture into alpha (though you'll need another shader to account for hardward with A8 and no L8...) so it's not a problem

In the fixed pipeline, there are two ways you can treat L8 as alpha. Using texture operation LERP, which newer cards support, or texture operation DOT3 (aka dp3), which may be supported on cards without LERP. The LERP solution works for multitexturing, however it's useless for frame buffer blending, as you'll want the result in the alpha channel... While you can replicate the alpha channel to the color channels, you can't take a color channel and move it to the alpha channel. Except for DOT3. DOT3 multiplies two colors and puts the result in all channels, including alpha. So, if you took your L8 texture and did a DOT3 with pure red, pure green, or pure blue, the level of grey would then be placed into the alpha channel as well.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!