Jump to content
  • Advertisement
Sign in to follow this  
xsirxx

Moved from World coord objects to Local coord objects, now no Zdepth?

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

Quote:
Original post by neneboricua19
Also, keep in mind that your z-buffer must be as large or larger than your render targets (in terms of dimensions) or you could get some weird results.


Yea I assumed that and so I went ahead and checked against it and microsoft's msdn said it should return an error if that happens, and my HRESULT is coming back just fine.

My setup code has always worked, and with present parameters.
my depth buffer is created the same as the usual way, I thought with just:
LPDIRECT3DSURFACE9 m_DepthBuffer;

Then in my object manager setup code(ran at beginning of app) grabs it with:

m_pd3dDevice->GetDepthStencilSurface(&m_DepthBuffer);

Now on a side note weird,

d3dpp.AutoDepthStencilFormat = pModeInfo->DepthStencilFormat;

and "pModeInfo->DepthStencilFormat" is equal to D3DFMT_D16...

and my render targets are,

D3DFMT_A8R8G8B8, D3DFMT_A8R8G8B8, D3DFMT_R32F..

these cant be the same size, so why would my HRESULT come back fine?

Share this post


Link to post
Share on other sites
Advertisement
I Solved it, not sure if this is the right way or what but basically created a texture to the surface and did a tex->GetSurfaceLevel(..).

That and one more problem, the resolution of the far plane and near plane clipping. I lengthed the close plane and shortened the far... perfect now.

[Edited by - xsirxx on July 26, 2005 3:38:20 PM]

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!