Jump to content
  • Advertisement
Sign in to follow this  

Unbind Render Target ?

This topic is 1171 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys,


I don't really understand what is going on here:

// this is simplified for clarity
// set render target to rt0
d3d_context->OMSetRenderTargets(1, &d3d_rt0_view, nullptr);
// now use rt0 as shader input
// set render target to rt1 (shouldn't this unbind rt0 ?)
d3d_context->OMSetRenderTargets(1, &d3d_rt1_view, nullptr);
// this breaks my ssao and causes debug errors
d3d_context->PSSetShaderResources(0, 1, &d3d_rt0_shader_view);

I'm basically rendering to textures then using them in a shader (for SSAO, etc.)







I have to unbind it explicitly like this:


ID3D11ShaderResourceView* srvs[1] = { nullptr };

d3d_context->PSSetShaderResources(0, 1, srvs);


Edited by Endemoniada

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!