diff options
Diffstat (limited to 'src/quick/scenegraph/shaders_ng/texture.vert')
-rw-r--r-- | src/quick/scenegraph/shaders_ng/texture.vert | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/quick/scenegraph/shaders_ng/texture.vert b/src/quick/scenegraph/shaders_ng/texture.vert new file mode 100644 index 0000000000..ae8a27f4a6 --- /dev/null +++ b/src/quick/scenegraph/shaders_ng/texture.vert @@ -0,0 +1,25 @@ +#version 440 + +layout(location = 0) in vec4 qt_VertexPosition; +layout(location = 1) in vec2 qt_VertexTexCoord; + +layout(location = 0) out vec2 qt_TexCoord; + +layout(std140, binding = 0) uniform buf { +#if QSHADER_VIEW_COUNT >= 2 + mat4 qt_Matrix[QSHADER_VIEW_COUNT]; +#else + mat4 qt_Matrix; +#endif + float opacity; +}; + +void main() +{ + qt_TexCoord = qt_VertexTexCoord; +#if QSHADER_VIEW_COUNT >= 2 + gl_Position = qt_Matrix[gl_ViewIndex] * qt_VertexPosition; +#else + gl_Position = qt_Matrix * qt_VertexPosition; +#endif +} |