Jump to content
  • Advertisement
Sign in to follow this  
Khaos Dragon

creating a shadowing cubemap

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

Oh, didn't see those earlier. Um, if I recall correctly, no. I think there's a seperate function to set the depth/stencil buffer. The cubeTexture faces though will have to be set in SetRenderTarget.

Share this post


Link to post
Share on other sites
Advertisement
Is there where I need D3DXCreateRenderToEnvMap?

GPU Gems says it is needed somewhere in its article about omnidirectional shadow mapping but never specifies where.

Share this post


Link to post
Share on other sites
Yeah, RenderToEnvMap is what I use, but making a cube texture that's a render target should work just as well.

Share this post


Link to post
Share on other sites
Hmm, what version of Direct3D are you using? I think it's an older version because the SetRenderTarget() method has been modified to support multiple render targets lately and depth/stencil surfaces are set with a different method.

-Mezz

Share this post


Link to post
Share on other sites
Quote:
Original post by Mezz
Hmm, what version of Direct3D are you using? I think it's an older version because the SetRenderTarget() method has been modified to support multiple render targets lately and depth/stencil surfaces are set with a different method.

-Mezz


Any idea what method that would be?
In response to your concern, no I have the latest june sdk, my code is just based on the cubemapping code in the sdk which I guess has not been updated along with the rest of the api yet. I fixed the setrendertarget functions to device->SetRenderTarget ( 0, cubeFace ) assuming I want the render index to be zero.

Share this post


Link to post
Share on other sites
The method is on IDirect3DDevice9 and it's called SetDepthStencilSurface().

Let us know the results.

-Mezz

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!