Force non negative value in bloom

This commit is contained in:
vlj 2014-09-15 22:11:53 +02:00
parent 8dfe72f73f
commit cb922ed4db
2 changed files with 2 additions and 2 deletions

View File

@ -12,5 +12,5 @@ void main()
float luma = getCIEYxy(col).x;
col *= smoothstep(1., 10., luma);
FragColor = vec4(col, 1.0);
FragColor = max(vec4(col, 1.0), vec4(0.));
}

View File

@ -10,5 +10,5 @@ void main()
vec4 col = .125 * texture(tex_128, uv);
col += .25 * texture(tex_256, uv);
col += .5 * texture(tex_512, uv);
FragColor = vec4(col.xyz, 1.);
FragColor = max(vec4(col.xyz, 1.), vec4(0.));
}