diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-26 11:32:55 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-26 11:33:19 +0200 |
commit | 7810209ba32fcebfa90b081670595daaa5333a78 (patch) | |
tree | 98410d5cc7d9d762bbde0cb4eae8041aa6e2e542 /tests/manual/rhi/shared/texture.vert | |
parent | 6f2eabb54e3f827ebd2b90f68144b86342933869 (diff) | |
parent | 88625709058b386ee74cca536c6c5556159c99fa (diff) |
Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I4ea2b77cc201daed94fbe321f146dfd20365a534
Diffstat (limited to 'tests/manual/rhi/shared/texture.vert')
-rw-r--r-- | tests/manual/rhi/shared/texture.vert | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/manual/rhi/shared/texture.vert b/tests/manual/rhi/shared/texture.vert new file mode 100644 index 0000000000..ad7e783dfb --- /dev/null +++ b/tests/manual/rhi/shared/texture.vert @@ -0,0 +1,21 @@ +#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; +} 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; +} |