summaryrefslogtreecommitdiffstats
path: root/tests/manual/rhi/tex3d/texture3d.vert
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/rhi/tex3d/texture3d.vert')
-rw-r--r--tests/manual/rhi/tex3d/texture3d.vert22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/manual/rhi/tex3d/texture3d.vert b/tests/manual/rhi/tex3d/texture3d.vert
new file mode 100644
index 0000000000..2b46dc84aa
--- /dev/null
+++ b/tests/manual/rhi/tex3d/texture3d.vert
@@ -0,0 +1,22 @@
+#version 440
+
+layout(location = 0) in vec4 position;
+layout(location = 1) in vec2 texcoord;
+
+layout(location = 0) out vec2 v_texcoord;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 mvp;
+ int flip;
+ int idx;
+} ubuf;
+
+out gl_PerVertex { vec4 gl_Position; };
+
+void main()
+{
+ v_texcoord = vec2(texcoord.x, texcoord.y);
+ if (ubuf.flip != 0)
+ v_texcoord.y = 1.0 - v_texcoord.y;
+ gl_Position = ubuf.mvp * position;
+}