aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/scenegraph_lancelot/data/shared/shaders/edge.frag
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/scenegraph_lancelot/data/shared/shaders/edge.frag')
-rw-r--r--tests/manual/scenegraph_lancelot/data/shared/shaders/edge.frag33
1 files changed, 21 insertions, 12 deletions
diff --git a/tests/manual/scenegraph_lancelot/data/shared/shaders/edge.frag b/tests/manual/scenegraph_lancelot/data/shared/shaders/edge.frag
index 8cb616f3e0..77d7b47499 100644
--- a/tests/manual/scenegraph_lancelot/data/shared/shaders/edge.frag
+++ b/tests/manual/scenegraph_lancelot/data/shared/shaders/edge.frag
@@ -1,14 +1,23 @@
-uniform lowp sampler2D source;
-varying highp vec2 qt_TexCoord0;
-uniform highp vec2 textureSize;
-uniform lowp vec4 color;
-uniform lowp float qt_Opacity;
+#version 440
+
+layout(location = 0) in vec2 qt_TexCoord0;
+layout(location = 0) out vec4 fragColor;
+
+layout(binding = 1) uniform sampler2D source;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 qt_Matrix;
+ float qt_Opacity;
+ vec2 textureSize;
+ vec4 color;
+} ubuf;
+
void main() {
- highp vec2 dx = vec2(0.5 / textureSize.x, 0.);
- highp vec2 dy = vec2(0., 0.5 / textureSize.y);
- gl_FragColor = color * 0.25
- * (texture2D(source, qt_TexCoord0 + dx + dy).a
- + texture2D(source, qt_TexCoord0 + dx - dy).a
- + texture2D(source, qt_TexCoord0 - dx + dy).a
- + texture2D(source, qt_TexCoord0 - dx - dy).a);
+ vec2 dx = vec2(0.5 / ubuf.textureSize.x, 0.);
+ vec2 dy = vec2(0., 0.5 / ubuf.textureSize.y);
+ fragColor = ubuf.color * 0.25
+ * (texture(source, qt_TexCoord0 + dx + dy).a
+ + texture(source, qt_TexCoord0 + dx - dy).a
+ + texture(source, qt_TexCoord0 - dx + dy).a
+ + texture(source, qt_TexCoord0 - dx - dy).a);
}