Jump to content
  • Advertisement
Sign in to follow this  
theScore

how to render in multiple surafces/targets ?

This topic is 2988 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

Hello !
I know how to render a scene in a texture, but how to render to several textures simultaneously ?
if I create 3 textures, how my pixel shader will write in each texture?
What i need, it is the directx function(s) names to use to write in 3 textures simultaneously, just in one rendering.
I assume that i have to create 3 surfaces too ?

With a single texture i have this :

renderTosurface1->BeginScene(surface1, &viewport);
//render the scene
renderTosurface1->EndScene();


But if i want to write in 3 surfaces at the same time, just with one rendering, how should i modify my code ?

Share this post


Link to post
Share on other sites
Advertisement
MRT is how you render to multiple surfaces, I gave you a link so you could start doing some research on how to implement it.

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!