1
0
Fork 0
fgdata/Shaders/HDR/visualize-depth.frag
Fernando García Liñán af29642423 HDR: miscellaneous changes
- Add an utility linearizeDepth function to help visualize the depth buffer for debug purposes.
- Use 'color0' instead of 'color' for all color attachments.
- Do not write to the HDR buffer if a fragment doesn't need shading (depth = 1).
2021-07-29 08:45:17 +02:00

14 lines
199 B
GLSL

#version 330 core
out vec4 fragColor;
in vec2 texCoord;
uniform sampler2D tex;
float linearizeDepth(float depth);
void main()
{
fragColor = vec4(linearizeDepth(texture(tex, texCoord).r));
}