blob: 4f5c292600a494e6f6bd52464abbecf7d467a01e [file] [log] [blame]
Courtney Goeltzenleuchter21c58b02014-10-30 10:07:20 -06001/*
Karl Schultz481756e2016-02-02 15:37:51 -07002 * Copyright (c) 2015-2016 The Khronos Group Inc.
3 * Copyright (c) 2015-2016 Valve Corporation
4 * Copyright (c) 2015-2016 LunarG, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and/or associated documentation files (the "Materials"), to
8 * deal in the Materials without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Materials, and to permit persons to whom the Materials are
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice(s) and this permission notice shall be included in
14 * all copies or substantial portions of the Materials.
15 *
Karl Schultz481756e2016-02-02 15:37:51 -070016 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 *
20 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
21 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
22 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE
23 * USE OR OTHER DEALINGS IN THE MATERIALS.
24 */
25/*
Courtney Goeltzenleuchter21c58b02014-10-30 10:07:20 -060026 * Fragment shader for cube demo
27 */
GregF54dc3782015-12-15 11:23:43 -070028#version 400
Courtney Goeltzenleuchter21c58b02014-10-30 10:07:20 -060029#extension GL_ARB_separate_shader_objects : enable
30#extension GL_ARB_shading_language_420pack : enable
Chia-I Wu6e68a892015-02-23 10:41:08 -070031layout (binding = 1) uniform sampler2D tex;
Courtney Goeltzenleuchter21c58b02014-10-30 10:07:20 -060032
33layout (location = 0) in vec4 texcoord;
Cody Northropafe800a2015-06-05 13:35:01 -060034layout (location = 0) out vec4 uFragColor;
Courtney Goeltzenleuchter21c58b02014-10-30 10:07:20 -060035void main() {
Cody Northropafe800a2015-06-05 13:35:01 -060036 uFragColor = texture(tex, texcoord.xy);
Courtney Goeltzenleuchter21c58b02014-10-30 10:07:20 -060037}