summaryrefslogtreecommitdiffstats
path: root/src/multimedia/shaders/argb.frag
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/shaders/argb.frag')
-rw-r--r--src/multimedia/shaders/argb.frag15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/multimedia/shaders/argb.frag b/src/multimedia/shaders/argb.frag
index bfe7a97b2..1adbc8dba 100644
--- a/src/multimedia/shaders/argb.frag
+++ b/src/multimedia/shaders/argb.frag
@@ -1,18 +1,19 @@
#version 440
+#extension GL_GOOGLE_include_directive : enable
+
+#include "uniformbuffer.glsl"
+#include "colortransfer.glsl"
layout(location = 0) in vec2 texCoord;
layout(location = 0) out vec4 fragColor;
-layout(std140, binding = 0) uniform buf {
- mat4 matrix;
- mat4 colorMatrix;
- float opacity;
- float width;
-} ubuf;
-
layout(binding = 1) uniform sampler2D rgbTexture;
void main()
{
fragColor = ubuf.colorMatrix * texture(rgbTexture, texCoord).gbar * ubuf.opacity;
+
+#ifdef QMM_OUTPUTSURFACE_LINEAR
+ fragColor = convertSRGBToLinear(fragColor);
+#endif
}