Sign in to follow this  

Depth map error

This topic is 2965 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'm trying to render the depth buffer to a texture and while it is working I get some strange results. The problem is that the depth value is mostly white. It's only until I get extremely close that it darkens, and even then it never gets specially dark. In my application I have a water plane where I am currently rendering the depth of the underlying terrain, that's why the attached image might look a bit weird. I realize I haven't provided much info, but I don't even know where to begin. Camera range goes from 1 to 1000. The code that sets up the render target was more or less copied from Frank D Luna's DirectX book. http://img21.imageshack.us/img21/9341/depthmaperror.png

Share this post


Link to post
Share on other sites
I see, thanks.

I increased the distance to the near clip plane
and got somewhat better results. The weird thing
is that the sample code I use for reference (Frank
D Luna's code) has a much closer near clip plane
and yet his depth map look a lot better.
(http://www.d3dcoder.net/Images/Book3/chap13.jpg)

Can I 'linearize' it somehow?

Share this post


Link to post
Share on other sites

This topic is 2965 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this