summaryrefslogtreecommitdiffstats
path: root/src/multimedia/shaders/externalsampler.frag
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2022-03-31 12:28:23 +0200
committerLars Knoll <lars.knoll@qt.io>2022-04-07 10:38:17 +0200
commitf94b272fe9d11836390cc44bdbfb9b7ac83893e1 (patch)
tree264de57d2d5d255390c5fa4041fc01aeddbc295a /src/multimedia/shaders/externalsampler.frag
parent8d8c33205a5d921f900144bc19840f4f652762a7 (diff)
Shader refactoring: Share the uniform buffer across shaders
Get rid of some code duplication and share the uniform buffer that we use across our shaders, so that we will only need to modify it in one place in the future. Change-Id: I649ce30b2b982dbb0e81f3c8793b33ad7f0429bb Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
Diffstat (limited to 'src/multimedia/shaders/externalsampler.frag')
-rw-r--r--src/multimedia/shaders/externalsampler.frag10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/multimedia/shaders/externalsampler.frag b/src/multimedia/shaders/externalsampler.frag
index 6431ea773..f786bc4e1 100644
--- a/src/multimedia/shaders/externalsampler.frag
+++ b/src/multimedia/shaders/externalsampler.frag
@@ -1,15 +1,11 @@
#version 440
+#extension GL_GOOGLE_include_directive : enable
+
+#include "uniformbuffer.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 plane1Texture;
void main()