I'm using direct2d and direct3d together and having an issue with gamma correction. My direct3d backbuffer is using an SRGB format and when I render images from direct2d onto the direct3d surface, they appear washed out. I can't seem to figure out how to enable SRGB on the direct2d end. Does anyone know who to do this?
I'm not very familiar with Direct2D, so I don't know if images there can be marked as being in sRGB format; but a possible workaround is to maintain two render target views of your back buffer, one in sRGB format and the other in regular (linear) RGB. When rendering Direct2D stuff where you just want to copy the pixels straight over, you'd use the linear one; when rendering 3D stuff you'd use the sRGB one. Note that this doesn't mean having two separate buffers, just two render target views of the same buffer. There could be a performance cost switching between them, though, so if possible you'd want to ensure you only switched once per frame.