2019-06-05 20:20:12 -04:00
|
|
|
#version 330
|
2019-02-14 21:53:02 -05:00
|
|
|
|
2019-06-05 20:20:12 -04:00
|
|
|
// pathfinder/resources/shaders/demo_ground.vs.glsl
|
2019-02-14 21:53:02 -05:00
|
|
|
//
|
|
|
|
// Copyright © 2019 The Pathfinder Project Developers.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
|
|
|
precision highp float;
|
2020-05-08 19:59:01 -04:00
|
|
|
|
|
|
|
#ifdef GL_ES
|
2020-03-27 17:53:00 -04:00
|
|
|
precision highp sampler2D;
|
2020-05-08 19:59:01 -04:00
|
|
|
#endif
|
2019-02-14 21:53:02 -05:00
|
|
|
|
|
|
|
uniform mat4 uTransform;
|
2019-05-02 16:13:43 -04:00
|
|
|
uniform int uGridlineCount;
|
2019-02-14 21:53:02 -05:00
|
|
|
|
2019-06-05 17:35:46 -04:00
|
|
|
in ivec2 aPosition;
|
2019-02-14 21:53:02 -05:00
|
|
|
|
2019-05-02 16:13:43 -04:00
|
|
|
out vec2 vTexCoord;
|
|
|
|
|
2019-02-14 21:53:02 -05:00
|
|
|
void main() {
|
2019-06-05 17:35:46 -04:00
|
|
|
vTexCoord = vec2(aPosition * uGridlineCount);
|
|
|
|
gl_Position = uTransform * vec4(ivec4(aPosition.x, 0, aPosition.y, 1));
|
2019-02-14 21:53:02 -05:00
|
|
|
}
|