Jump to content
  • Advertisement


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

Suicidal Insanity

8 bit palettized mode with direct3d9 (windowed) - not working

This topic is 5660 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

after reading that direct3d 9 supports on the fly format conversion, i tried to use this, however the CreateDevice call fails when the format is set as D3DFMT_P8. if i read SDK correctly thos ought to work... also tried using 8 bit textures to render to, this works fine, except radeon 9700 doesn''t like the D3DFMT_P8 setting. anyone know how to enable this or work around?

Share this post

Link to post
Share on other sites
Modern 3D cards don't support palettised frame buffers when used for 3D rendering. This is the case for all chips. AFAICR no PC 3D hardware that supports Direct3D ever has.

Many modern 3D cards don't even support palettised textures.

"On the fly conversion" wouldn't be the term I'd use.
In D3D you have a backbuffer. With modern devices, this can be one of a number of 16bit or 32bit formats, some even support higher, but not 8bit/palettised.

You also have textures. Textures can be in a different bit depth and format than the back buffer. On some devices they can even be 8 bit/palettised. When a txture is applied to a polygon that is rendered into the frame buffer, then what you could call a conversion takes place during the pixel processing pipeline.

BTW: If you run with the DEBUG version of the SDK and set the D3D debug ouput level in the DirectX control panel applet to maximum, then D3D will write out the exact reason a particular call has failed to the debug output window.


The ATI Radeon 9x00 chips are one of those that don't support palettised textures.

This is reported in the device capabilities, and can be determined by calling CheckDeviceFormat().

You can also see this if you run the DirectX caps viewer. There are a few 8 bit texture formats that the Radeons do support, but none of them are palettised. For example D3DFMT_L8 is 8bit luminance (greyscale), D3DFMT_R3G3B2 (3bits red, 3bits green, 2bits blue).

On the new Radeons you do have pixel shaders in hardware, so you can get almost the same as palettised textures using an L8 texture and a dependent texture read in a pixel shader. Though you do use up an extra texture unit and it isn't quite the same due to texture sampling.

Simon O'Connor
Creative Asylum Ltd

[edited by - s1ca on June 16, 2003 7:56:18 PM]

Share this post

Link to post
Share on other sites
i was hoping that it was an error on my side and not the general hardware support itself :D
do you have an example of doing the texture dependent read?

sounds like the easiest way since I am just looking for an simple way to use a mostly software 8 bit rendering engine and displaying output to the screen in windowed mode, i had once done something similar except pure GDI for the display and my software engine could render over 200 fps if it weren''t for the huge overhead to display it.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!