121c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchter/*
2481756e168555e1bf150d3b8f1b81edca1d98c43Karl Schultz * Copyright (c) 2015-2016 The Khronos Group Inc.
3481756e168555e1bf150d3b8f1b81edca1d98c43Karl Schultz * Copyright (c) 2015-2016 Valve Corporation
4481756e168555e1bf150d3b8f1b81edca1d98c43Karl Schultz * Copyright (c) 2015-2016 LunarG, Inc.
5481756e168555e1bf150d3b8f1b81edca1d98c43Karl Schultz *
643b53e83705f02245da6ae61e31273866a35b833Jon Ashburn * Licensed under the Apache License, Version 2.0 (the "License");
743b53e83705f02245da6ae61e31273866a35b833Jon Ashburn * you may not use this file except in compliance with the License.
843b53e83705f02245da6ae61e31273866a35b833Jon Ashburn * You may obtain a copy of the License at
9481756e168555e1bf150d3b8f1b81edca1d98c43Karl Schultz *
1043b53e83705f02245da6ae61e31273866a35b833Jon Ashburn *     http://www.apache.org/licenses/LICENSE-2.0
11481756e168555e1bf150d3b8f1b81edca1d98c43Karl Schultz *
1243b53e83705f02245da6ae61e31273866a35b833Jon Ashburn * Unless required by applicable law or agreed to in writing, software
1343b53e83705f02245da6ae61e31273866a35b833Jon Ashburn * distributed under the License is distributed on an "AS IS" BASIS,
1443b53e83705f02245da6ae61e31273866a35b833Jon Ashburn * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1543b53e83705f02245da6ae61e31273866a35b833Jon Ashburn * See the License for the specific language governing permissions and
1643b53e83705f02245da6ae61e31273866a35b833Jon Ashburn * limitations under the License.
17481756e168555e1bf150d3b8f1b81edca1d98c43Karl Schultz */
18481756e168555e1bf150d3b8f1b81edca1d98c43Karl Schultz/*
1921c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchter * Vertex shader used by Cube demo.
2021c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchter */
2154dc378a28d3b3c1c73593f1e8b063aab9d57cdeGregF#version 400
2221c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchter#extension GL_ARB_separate_shader_objects : enable
2321c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchter#extension GL_ARB_shading_language_420pack : enable
249b439f3695fad55b0eca84cafdecf4c10eaac43bJason Ekstrandlayout(std140, binding = 0) uniform buf {
2521c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchter        mat4 MVP;
2621c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchter        vec4 position[12*3];
2721c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchter        vec4 attr[12*3];
2821c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchter} ubuf;
2921c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchter
3021c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchterlayout (location = 0) out vec4 texcoord;
3154dc378a28d3b3c1c73593f1e8b063aab9d57cdeGregF
3221c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchtervoid main()
3321c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchter{
34fcfe34cf91a630a4f1d1613a2e4e4c101adea69cGregF   texcoord = ubuf.attr[gl_VertexIndex];
35fcfe34cf91a630a4f1d1613a2e4e4c101adea69cGregF   gl_Position = ubuf.MVP * ubuf.position[gl_VertexIndex];
3621c58b0c984e255596f143baed76913c868abc03Courtney Goeltzenleuchter}
37