I recently came across this blog post Yet another post about gamma correction which taught me the availability of the D3DPMISCCAPS_POSTBLENDSRGBCONVERT capability flag.
Thi开发者_如何转开发s should allow for proper sRGB conversion after blending on DirectX9.
What I don't understand is what to do with it? I can query my device Direct3D 9Ex device for this capability but how do I enable it if supported? Do I have the choice between pre and post blending conversion? If yes, how?
Thanks for you help!
It's just informative; there's no way to enable or disable. Either the hardware blends in sRGB space (POSTBLENDSRGBCONVERT is FALSE) or it blends in linear space (POSTBLENDSRGBCONVERT is TRUE). This cap just tells you what the hardware does; how you deal with that is going to be application specific.
Since only older hardware should be blending in sRGB (DX10 requires linear blending), you might choose to disable gamma-correct rendering on those parts. Or if you were willing to suffer the performance, you could do your blending to a non-sRGB target (to get linear blending), and then do a copy from that target to an sRGB target.
精彩评论