2017-09-03 22:24:28 -04:00
|
|
|
// pathfinder/shaders/gles2/demo-3d-monument.vs.glsl
|
|
|
|
//
|
|
|
|
// Copyright (c) 2017 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.
|
|
|
|
|
2017-12-30 20:32:51 -05:00
|
|
|
//! Renders the monument surface in the 3D demo.
|
|
|
|
|
2017-09-03 22:24:28 -04:00
|
|
|
precision mediump float;
|
|
|
|
|
2017-11-03 21:49:25 -04:00
|
|
|
uniform mat4 uProjection;
|
|
|
|
uniform mat4 uModelview;
|
2017-09-03 22:24:28 -04:00
|
|
|
|
|
|
|
attribute vec3 aPosition;
|
|
|
|
|
2017-11-03 21:49:25 -04:00
|
|
|
varying vec3 vPosition;
|
|
|
|
|
2017-09-03 22:24:28 -04:00
|
|
|
void main() {
|
2017-11-03 21:49:25 -04:00
|
|
|
vec4 position = uModelview * vec4(aPosition, 1.0);
|
|
|
|
vPosition = position.xyz / position.w;
|
|
|
|
gl_Position = uProjection * position;
|
2017-09-03 22:24:28 -04:00
|
|
|
}
|