Jump to content
  • Advertisement
Sign in to follow this  

Unbind Render Target ?

This topic is 1092 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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!