summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/rhi/qrhi/data/simpletextured_array.frag
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/rhi/qrhi/data/simpletextured_array.frag')
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletextured_array.frag17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/gui/rhi/qrhi/data/simpletextured_array.frag b/tests/auto/gui/rhi/qrhi/data/simpletextured_array.frag
new file mode 100644
index 0000000000..c5ee2057d8
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/simpletextured_array.frag
@@ -0,0 +1,17 @@
+#version 440
+
+layout(location = 0) in vec2 uv;
+layout(location = 0) out vec4 fragColor;
+
+layout(binding = 0) uniform sampler2D tex[3];
+
+void main()
+{
+ vec4 c0 = texture(tex[0], uv);
+ vec4 c1 = texture(tex[1], uv);
+ vec4 c2 = texture(tex[2], uv);
+ vec4 cc = c0 + c1 + c2;
+ vec4 c = vec4(clamp(cc.r, 0.0, 1.0), clamp(cc.g, 0.0, 1.0), clamp(cc.b, 0.0, 1.0), clamp(cc.a, 0.0, 1.0));
+ c.rgb *= c.a;
+ fragColor = c;
+}