Hi,
I am working on a coursework for my University, and some of the effects in that require multi pass rendering.
I understand what it is and I've mostly implemented it.
But I don't understand how can I combine 2 textures into one properly.
I mean ShaderResourceView that I get from RenderTargetView is just a texture in the end, so I did blending on them, it works if I clear my background to white. But if I clear my background to anything else, it does not look right.
My question is, is there a better way to reuse the ShaderResourceView.
My ideal situation would be:
(Pass 1)Render the Transparent Cube to texture --> (Pass 2)Do some effect (Edge Detection for example) --> (Pass 3)Pass that ShaderResourceView from Pass 2 and then draw the textured cube --> (Pass 4) render to back buffer and call swap buffer
Any suggestions or ideas are welcome.
[attachment=29928:d3d11_1.png]
The Blending:
[attachment=29930:d3d11_3.png] + [attachment=29931:d3d11_4.png] = [attachment=29929:d3d11_2.png]
If it comes down to me having white background and blending the way I do now, that is fine, I guess I will just do the environment mapping at the very end.