Jump to content
  • Advertisement
Sign in to follow this  
Icetigris

DX11 Render targets w/ different dimensions than Back Buffer DX11

This topic is 2292 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, I'm trying to do some image processing type stuff (Gaussian blur) on some 1024x1024 textures, but my back buffer is 800x600. I'm not sure what the rules are on how to do this, so at the moment I either get distorted textures or render targets that clear, but don't get drawn to. Can someone give me a step-by-step process of how to do this? I've read that all active render targets have to be the same type and dimensions, but I feel like I'm missing something.

Share this post


Link to post
Share on other sites
Advertisement
If you're using MRT then all render targets *bound to the context* need to be the same dimensions, but that isn't a global 'if you EVER don't send the same dimensions to CreateRenderTargetView() then D3D gonna asplode.' Based on what you're trying to do, you should easily be able to create a simple 1024x1024 target and bind/work with that directly.

If that's what you *are* doing, then it sounds like some code is in order.

Share this post


Link to post
Share on other sites
To me it sounds like he's using a swap chain and rendering things to screen, hence the mentioned back buffer. Forget about screen and rendering to it, Icetigris, you're going to render to "virtual" "frame buffers" (render targets), which have nothing to do with your window (it doesn't even have to exist).
Just create a texture (ID3D11Device::CreateTexture2D), create a RTV for this texture (ID3D11Device::CreateRenderTargetView), set the RTV (ID3D11DeviceContext::OMSetRenderTargets), apply your shader, set some SRVs (shader resources, source textures...) and issue a draw call (typically a 4 vertex quad). Your card will render into your custom texture (instead of screen).

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!