Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#Actualkauna

Posted 26 April 2013 - 06:50 AM

Yes, you may use GS to output a primitive to multiple render targets (the DX SDK example does exactly that). 

 

However, it is perfectly fine to render each cube map side separately too. The performance difference may be negligible since GS is typically a performance hog if used to output lots of primitives. I prefer slightly rendering each side separately since then you don't need separate vertex shaders for rendering cube maps / rendering normally. Since cube map render target gives you 6 rendertargetviews, you can render them separately by just selecting the desired target. 

 

There is a function in D3DX to save dds files (may work with cubemaps), but MSDN suggests using DirectXTK with similar function since D3DX is almost deprecated. 

 

[edit] It seems that DirectXTK won't save cubemaps correctly.

 

Cheers!


#1kauna

Posted 26 April 2013 - 06:05 AM

Yes, you may use GS to output a primitive to multiple render targets (the DX SDK example does exactly that). 

 

However, it is perfectly fine to render each cube map side separately too. The performance difference may be negligible since GS is typically a performance hog if used to output lots of primitives. I prefer slightly rendering each side separately since then you don't need separate vertex shaders for rendering cube maps / rendering normally. Since cube map render target gives you 6 rendertargetviews, you can render them separately by just selecting the desired target. 

 

There is a function in D3DX to save dds files (may work with cubemaps), but MSDN suggests using DirectXTK with similar function since D3DX is almost deprecated. 

 

Cheers!


PARTNERS