diff options
Diffstat (limited to 'tests/auto/gui/rhi/qrhi/data')
-rw-r--r-- | tests/auto/gui/rhi/qrhi/data/texture.frag | 12 | ||||
-rw-r--r-- | tests/auto/gui/rhi/qrhi/data/texture.vert | 18 |
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/auto/gui/rhi/qrhi/data/texture.frag b/tests/auto/gui/rhi/qrhi/data/texture.frag new file mode 100644 index 0000000000..e6021fe905 --- /dev/null +++ b/tests/auto/gui/rhi/qrhi/data/texture.frag @@ -0,0 +1,12 @@ +#version 440 + +layout(location = 0) in vec2 v_texcoord; + +layout(location = 0) out vec4 fragColor; + +layout(binding = 1) uniform sampler2D tex; + +void main() +{ + fragColor = texture(tex, v_texcoord); +} diff --git a/tests/auto/gui/rhi/qrhi/data/texture.vert b/tests/auto/gui/rhi/qrhi/data/texture.vert new file mode 100644 index 0000000000..de486cb772 --- /dev/null +++ b/tests/auto/gui/rhi/qrhi/data/texture.vert @@ -0,0 +1,18 @@ +#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; +} ubuf; + +out gl_PerVertex { vec4 gl_Position; }; + +void main() +{ + v_texcoord = texcoord; + gl_Position = ubuf.mvp * position; +} |