1
0
Fork 0
fgdata/Shaders/HDR/geometry-lfeat.frag
Fernando García Liñán c4d19877cf HDR: Significant update
- New atmosphering rendering technique based on my own work.
- Attempt to fix some remaining transparency issues.
- Use a luminance histogram for auto exposure.
- Add support for clustered shading.
- Add WS 2.0 shaders.
- Add 3D cloud shaders.
- Add orthoscenery support.
2023-04-06 00:18:29 +02:00

30 lines
638 B
GLSL

#version 330 core
layout(location = 0) out vec4 outGBuffer0;
layout(location = 1) out vec4 outGBuffer1;
layout(location = 2) out vec4 outGBuffer2;
in vec3 normalVS;
in vec2 texCoord;
uniform sampler2D color_tex;
vec2 encodeNormal(vec3 n);
vec3 decodeSRGB(vec3 screenRGB);
void main()
{
vec4 texel = texture(color_tex, texCoord);
if (texel.a < 0.5)
discard;
vec3 color = decodeSRGB(texel.rgb);
outGBuffer0.rg = encodeNormal(normalVS);
outGBuffer0.b = 0.9;
outGBuffer0.a = 1.0;
outGBuffer1.rgb = color;
outGBuffer1.a = 0.0;
outGBuffer2.rgb = vec3(0.0);
outGBuffer2.a = 1.0;
}