16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 17:29:18 +02:00

fixes, configurable framebuffers quality

This commit is contained in:
milek7
2018-10-14 21:52:37 +02:00
parent d8b902a364
commit dd0a9b1d77
24 changed files with 289 additions and 141 deletions

View File

@@ -1,6 +1,7 @@
#version 330
#include <common>
#include <tonemapping.glsl>
flat in vec3 f_normal_raw;
@@ -12,8 +13,13 @@ void main()
if (dist2 > 0.5f * 0.5f)
discard;
// color data is shared with normals, ugh
gl_FragData[0] = vec4(f_normal_raw.bgr, 1.0f);
// color data space is shared with normals, ugh
vec4 color = vec4(pow(f_normal_raw.bgr, vec3(2.2)), 1.0f);
#if POSTFX_ENABLED
gl_FragData[0] = color;
#else
gl_FragData[0] = tonemap(color);
#endif
#if MOTIONBLUR_ENABLED
gl_FragData[1] = vec4(0.0f);
#endif