Jump to content
  • Advertisement
Sign in to follow this  
theScore

Basic question about rendering in texture(s)

This topic is 2018 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 asking me this question : coming from directx 9, the instructions have changed and I wondered and met difficulties to find what D3D11 methods must be used to specify a renderTarget as an input, and same question for an output ? I don't use .fx files at the moment.

 

PS : I render in 3 textures in my pixel shader. I 'd like to find how to bind render target to slots 1 and 2 for example.

Edited by theScore

Share this post


Link to post
Share on other sites
Advertisement

You'll need:

 

- to create a 2d texture(s) with render target bind flag and rendertarget view

 

Desc.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE;

 

- set rendertarget(s) and depth stencil view use OMSetRenderTargets( ... );

 

- use a pixel shader with as many SV_Targetn outputs as you need (n = 0,1,2,3 ...)

 

(- restore previous rendertarget (backbuffer for example).)

 

Cheers!

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!