Welcome!
Welcome dans ce blog infâme, un des endroits du web ou je poste les choses que je ne poste pas ailleurs (i.e: Geeks3D...) et où je teste les thèmes WP que je trouve sympa.

RSS Feed

Posts Tagged ‘depth’

Here is a GLSL code snippet to convert the exponential depth to a linear value:

float f=1000.0;
float n = 0.1;
float z = (2 * n) / (f + n - texture2D( texture0, texCoord ).x * (f - n));

where:
- f = camera far plane
- n = camera near plane
- texture0 = depth map.

[source]