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.
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
Asked: 2022-11-25 11:00:00 +0000
Seen: 11 times
Last updated: Sep 03 '22
What is the syntax formula for computing age in Zoho?
How can I assess a formula from a different cell without using the equal (=) sign or VBA?
What is the ArrayFormula that should be included in this formula?
How can I improve and fix the dax formula?
How can I add up the value of a different layer's field when it intersects with a polygon in QGIS?
What is the expected outcome of the math.floor function in terms of the return value?
What is the method to retrieve the value of a checkbox using react-hook-form?