1
0
Fork 0
fgdata/Compositor/Shaders/ALS/terrain-writedepth.frag

13 lines
196 B
GLSL
Raw Normal View History

#version 120
uniform float fg_Fcoef;
varying float flogz;
void main()
{
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
// logarithmic depth
gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5;
}