Files
Server_Monitor/shaders/postprocessing.frag

24 lines
425 B
GLSL
Raw Permalink Normal View History

2023-09-26 19:40:16 +02:00
#version 430 core
out vec4 FragColor;
in vec2 frag_uv;
uniform sampler2D texture0; // rendered 3D
uniform sampler2D texture1; // rendered HUD
void main()
{
vec3 hdr_color = texture(texture0, frag_uv).rgb;
// HDR - TODO
vec3 sdr_color = min(hdr_color, 1.0);
vec4 hud_color = texture(texture1, frag_uv);
vec3 mixed = mix(sdr_color, hud_color.rgb, hud_color.a); // TODO: SDR color
FragColor = vec4(mixed, 1.0);
}