2020-02-05 00:50:13 -05:00
|
|
|
#version 330
|
|
|
|
|
|
|
|
// pathfinder/shaders/tile_alpha.vs.glsl
|
2019-01-14 22:32:53 -05:00
|
|
|
//
|
2020-02-05 00:50:13 -05:00
|
|
|
// Copyright © 2020 The Pathfinder Project Developers.
|
2019-01-14 22:32:53 -05:00
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
|
2020-02-05 00:50:13 -05:00
|
|
|
precision highp float;
|
|
|
|
|
2019-06-25 14:32:39 -04:00
|
|
|
uniform mat4 uTransform;
|
2019-01-14 22:32:53 -05:00
|
|
|
uniform vec2 uTileSize;
|
|
|
|
|
2020-02-07 14:46:20 -05:00
|
|
|
in ivec2 aTilePosition;
|
|
|
|
in vec2 aColorTexCoord;
|
|
|
|
in vec2 aMaskTexCoord;
|
2019-01-14 22:32:53 -05:00
|
|
|
|
2020-02-05 00:50:13 -05:00
|
|
|
out vec2 vColorTexCoord;
|
2020-02-07 14:46:20 -05:00
|
|
|
out vec2 vMaskTexCoord;
|
2019-03-22 17:28:18 -04:00
|
|
|
|
2020-02-05 00:50:13 -05:00
|
|
|
void main() {
|
2020-02-07 14:46:20 -05:00
|
|
|
vec2 position = aTilePosition * uTileSize;
|
2019-02-18 16:42:30 -05:00
|
|
|
|
2020-02-07 14:46:20 -05:00
|
|
|
vMaskTexCoord = aMaskTexCoord;
|
|
|
|
vColorTexCoord = aColorTexCoord;
|
2019-06-25 14:32:39 -04:00
|
|
|
gl_Position = uTransform * vec4(position, 0.0, 1.0);
|
2019-01-14 22:32:53 -05:00
|
|
|
}
|