Files
maszyna/shaders/color.frag
Ryba04 a63273d470 fix color.frag
Fixed an error found by Michausto and JAN21
2024-07-10 22:59:03 +02:00

25 lines
471 B
GLSL

in vec3 f_color;
in vec4 f_pos;
#include <common>
#include <apply_fog.glsl>
#include <tonemapping.glsl>
layout(location = 0) out vec4 out_color;
#if MOTIONBLUR_ENABLED
layout(location = 1) out vec4 out_motion;
#endif
void main()
{
vec3 col = clamp(pow(f_color.rgb, vec3(2.2)),0, 1);
#if POSTFX_ENABLED
out_color = vec4(apply_fog(col), 1.0f);
#else
out_color = tonemap(vec4(apply_fog(col), 1.0f));
#endif
#if MOTIONBLUR_ENABLED
out_motion = vec4(0.0f);
#endif
}