af29642423
- 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).
14 lines
199 B
GLSL
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));
|
|
}
|