Ask Your Question
0

What is the method for de-linearizing the value of the depth buffer?

asked 2022-11-25 11:00:00 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-09-03 21:00:00 +0000

lalupa gravatar image

The method for de-linearizing the value of the depth buffer is to use the following formula:

real_depth = 2 * near * far / (far + near - (2 * depth - 1) * (far - near))

where: - real_depth is the actual depth value in world units - near is the distance to the near clipping plane - far is the distance to the far clipping plane - depth is the depth value read from the depth buffer, which is typically in the range of [0, 1]

This formula accounts for the non-linear distribution of depth values in the depth buffer and maps them back to the actual depth values in world units.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-11-25 11:00:00 +0000

Seen: 11 times

Last updated: Sep 03 '22