# When and how does openGL calculate F\_depth(depth value)

**URL:** <https://community.khronos.org/t/when-and-how-does-opengl-calculate-f-depth-depth-value/106086>\
**Category:** OpenGL: Basic Coding\
**Created:** [July 25, 2020, 4:37am UTC](https://community.khronos.org/t/when-and-how-does-opengl-calculate-f-depth-depth-value/106086 "2020-07-25T04:37:41Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![GClements](https://community.khronos.org/letter_avatar_proxy/v4/letter/g/e0b2c6/32.png) [@GClements](https://community.khronos.org/u/GClements)\
**Post date:** [July 26, 2020, 9:33am UTC](https://community.khronos.org/t/when-and-how-does-opengl-calculate-f-depth-depth-value/106086/27 "2020-07-26T09:33:15Z")

</div>

> [@nirla123](#):
>
> But, one thing, during window transformation z value seems to map to [0,1], meaning (x’,y’,z’), where x’,y’,z’ are the window transformed coordinates. meaning (x’,y’,z’) don’t span a plane, they span a space, so while drawing, the z’ coords are ignored?

If you don’t have a depth buffer, the z’ coordinates are redundant. The x’,y’ coordinates determine which pixels are covered by the primitive (point, line, triangle).

---

_[View the full topic](https://community.khronos.org/t/when-and-how-does-opengl-calculate-f-depth-depth-value/106086)._
