diff options
Diffstat (limited to 'o3d/compiler/glsl_validator/shaders/spore-view.vert')
-rw-r--r-- | o3d/compiler/glsl_validator/shaders/spore-view.vert | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/o3d/compiler/glsl_validator/shaders/spore-view.vert b/o3d/compiler/glsl_validator/shaders/spore-view.vert new file mode 100644 index 0000000..8ed64c3 --- /dev/null +++ b/o3d/compiler/glsl_validator/shaders/spore-view.vert @@ -0,0 +1,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; +} |