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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user