• Advertisement
Sign in to follow this  

How to dither to a 24/32 bit surface in DirectX/SlimDX

This topic is 1938 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 Basically what I am trying to do is be able to display a red (or green or blue) letter with more then 256 possible shades. For example normally if I have a blue letter 'A' with an rgb value of (0 , 0 , 100) the next blue level up would be an rgb (0, 0 , 101). I want to be to show an 'A' that "APPEARS" to have an rgb value of (0, 0, 100.25). Basically I want to do this by making 3/4th of the pixels in the "A" have (0,0,100) and 1/4th have a value of (0,0,101). I noticed that there is a dither filter in DX but from reading about it I don't think it is quite what I want but I am not sure. The reason I don't think I can use the built in dithering is because from what I have read here: http://www.toymaker.info/Games/html/render_states.html#blends the built in dithering is legacy code that only works when rendering to a 16bit surface. I need a way to dither from a pixel format that is > 8bits per channel down to 8bits per channel. Does any one know of a way I could implement this dithering. I don't know anything about writing pixel shaders but do you think that might be the right approach? If I could figure out a way to determine which pixels made up the letter I would could try a simple dithering technique where I just go through each pixel and based on a 25% probability bump the color up one but this would be less then ideal. Does anyone have any experience with dithering in DirectX and know of any techniques that would make this possible.

NOTE: I am using SlimDX (DX9) but could switch to DX10/11 if needed

Share this post


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

  • Advertisement