Original Post
Hi, I've got a situation where I need to render the Earth's clouds on a sphere using transparency (since, obviously, the land/ocean were rendered beneath). I have no problems using a PNG file with transparency to do this. BUT, the interesting thing is that the PNG file is pure white in the RGB channels and only contains information in the alpha channel. So, what I would like to do is extract the alpha channel and save it as a grayscale JPG file. This would save significant space by letting me use lossy compression -- this is a large texture! I do NOT want to load a JPG file and then transfer its contents into the alpha channel of an otherwise empty (solid color) 32-bit texture. Is there some relatively easy way I can set the render states to instruct Direct3D to "draw white, but using to control the alpha of this white"? I'd really like to know how to do it for ANY color, not just white. Any advice? I have been using the standard D3DRS_SRCBLEND, D3DBLEND_SRCALPHA D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA combination to this point (except when using additive blend). Thanks! -Jay