Jump to content

  • Log In with Google      Sign In   
  • Create Account

Render targets w/ different dimensions than Back Buffer DX11


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Icetigris   Members   -  Reputation: 122

Like
0Likes
Like

Posted 05 April 2012 - 07:13 AM

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.
Show me a sane man and I will cure him for you.

Sponsor:

#2 InvalidPointer   Members   -  Reputation: 1433

Like
0Likes
Like

Posted 05 April 2012 - 07:19 AM

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.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.

#3 pcmaster   Members   -  Reputation: 671

Like
0Likes
Like

Posted 06 April 2012 - 01:44 AM

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).




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS