• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3 * Not a Contribution.
4 *
5 * Copyright 2015 The Android Open Source Project
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 *      http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20const char* fullscreen_vertex_shader = "                                      "
21"#version 300 es                                                            \n"
22"precision highp float;                                                     \n"
23"layout(location = 0) in vec2 iUV;                                          \n"
24"out vec2 uv;                                                               \n"
25"void main()                                                                \n"
26"{                                                                          \n"
27"    vec2 positions[3];                                                     \n"
28"    positions[0] = vec2(-1.0f, 3.0f);                                      \n"
29"    positions[1] = vec2(-1.0f, -1.0f);                                     \n"
30"    positions[2] = vec2(3.0f, -1.0f);                                      \n"
31"    vec2 uvs[3];                                                           \n"
32"    uvs[0] = vec2(0.0f, -1.0f);                                            \n"
33"    uvs[1] = vec2(0.0f, 1.0f);                                             \n"
34"    uvs[2] = vec2(2.0f, 1.0f);                                             \n"
35"    gl_Position = vec4(positions[gl_VertexID], -1.0f, 1.0f);               \n"
36"    uv = uvs[gl_VertexID];                                                 \n"
37"}                                                                          \n";
38