24 lines
425 B
GLSL
24 lines
425 B
GLSL
#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);
|
|
}
|