summaryrefslogtreecommitdiffstats
path: root/tests/manual/rhi/shared/texture_arr.frag
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/rhi/shared/texture_arr.frag')
-rw-r--r--tests/manual/rhi/shared/texture_arr.frag19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/manual/rhi/shared/texture_arr.frag b/tests/manual/rhi/shared/texture_arr.frag
new file mode 100644
index 0000000000..0a2631e2bd
--- /dev/null
+++ b/tests/manual/rhi/shared/texture_arr.frag
@@ -0,0 +1,19 @@
+#version 440
+
+layout(location = 0) in vec2 v_texcoord;
+
+layout(location = 0) out vec4 fragColor;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 mvp;
+ int flip;
+ int array_index;
+};
+
+layout(binding = 1) uniform sampler2DArray texArr;
+
+void main()
+{
+ vec4 c = texture(texArr, vec3(v_texcoord, float(array_index)));
+ fragColor = vec4(c.rgb * c.a, c.a);
+}