R2 Shaders
R2DebugLogDepthComposed.frag
Go to the documentation of this file.
1 /// \file R2DebugLogDepthComposed.frag
2 /// \brief Writes the logarithmic depth of the fragment to the first fragment output.
3 
4 #include "R2LogDepth.h"
5 
6 uniform vec4 data;
7 
8 layout(location = 0) out vec4 R2_out;
9 
10 void
11 main (void)
12 {
13  float e = R2_logDepthEncodePartial (1.0 + data.x, data.y);
14  float d = R2_logDepthDecode (e, data.y);
15  R2_out = vec4 (d, 0.0, 0.0, 0.0);
16 }
float R2_logDepthEncodePartial(const float z, const float depth_coefficient)
Definition: R2LogDepth.h:33
float R2_logDepthDecode(const float z, const float depth_coefficient)
Definition: R2LogDepth.h:72
Logarithmic depth functions.
layout(location=0) out vec4 R2_out
RGBA color.