c++ - How to unbind a RenderTarget texture so it can be used as input to the next pass -
i have texture, along shaderresourceview, render scene's original image using rendertarget.
like millions before me, use input next shader can blur, hdr, of that.
the simple "new me" problem when go call pssetshaderresources , put texture shader's texture/constant buffer error:
"resource being set ps shader resource slot 0 still bound on output"
...which makes sense, may still be. question how unbind texture being render target of initial pass?
i'm doing this, presume sets original rendertargetview dxut using @ beginning, doesn't seem free texture:
id3d11rendertargetview * rendertargetviewarraytq[1] = { dxutgetd3d11rendertargetview() }; pd3dimmediatecontext->omsetrendertargets(1, rendertargetviewarray, nullptr);
assuming render target in slot 0:
id3d11rendertargetview* nullrtv = nullptr; d3dcontext->omsetrendertargets(1, &nullrtv, nullptr);
you need pass array of id3d11rendertargetview* of length 1, first of needs nullptr.
Comments
Post a Comment