I'm relatively new to color blending in DirectX, and I'm hoping there is a relatively simple answer to this question. I am targeting Direct10.1. What I am trying to achieve is colour blending of two overlapping 2D shapes, where the blend factor between the two layers varies (in quite a simple manner).

The shapes in the output I want should be completely opaque. I can achieve the blend variation I need very easily using alpha blending and modifying the alpha value in the pixel shader, but of course this then ends up giving me a final image with areas of partial transparency. One way I think I could resolve this would be to simply render the original render target again in a quad, and multiply out the alpha values to give me a 100% opaque images, but I have a niggling feeling that the blend operation I want must be possible via some blend state configuration.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.