summaryrefslogtreecommitdiffstats
path: root/o3d/compiler/glsl_validator/shaders/spore-view.vert
blob: 8ed64c3fb78d0c7229a69bac2a97fdd0922ef72d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
attribute vec3 aVertex;
attribute vec3 aNormal;
attribute vec2 aTexCoord0;

uniform mat4 uPMatrix;
uniform mat4 uMVMatrix;
uniform vec4 uViewPosition;

varying vec3 vNormal;
varying vec3 vViewVec;
varying vec2 vTexCoord0;

void main(void) {
    gl_Position = uPMatrix * uMVMatrix * vec4(aVertex, 1.0);

    vNormal = aNormal;
    vViewVec = uViewPosition.xyz - aVertex.xyz;
    vTexCoord0 = aTexCoord0;
}