DepthRange value


I defined a glDepthRange like this

near = 10
far = 500

it means 0 (10) and 1 (500) in transformated depth coordinates…

Do you know how I can get the z depth coordinate for a Z value I give between 10 and 500 as it’s not linear…


Have you tried an exponential distribution ?
z = exp ((log(Z)-10)/490)

Or maybe the logarithmic distribution
z = log ((exp(Z)-10)/490)

[This message has been edited by Morglum (edited 05-08-2002).]