The final depth range transformation is linear? And the formula given in learnopenGL:
F_depth = 1/z-1/near/(1/far - 1/near) is only non-linear because it contains the perspective divide also within the formula?(somehow composed as you had mentioned)
I tried to compose the formula as you had mentioned, however I get something different:
Also, alfonse mentioned has mentioned :
View space is not transformed directly into NDC space. View space is transformed into clip-space , where the W component is not necessarily 1. The transformation into NDC space divides the clip-space XYZ by W, then clamps to [-1, 1].
But the viewport transformation is what maps the depth from [-1, 1] to [0,1]. You can’t disregard the very thing you’re talking about.
Is the depth range transformation equivalent to the window viewport transformation?(At least for the z -axis)?