summaryrefslogtreecommitdiffstats
path: root/src/extras/shaders/es2/gooch.vert
diff options
context:
space:
mode:
Diffstat (limited to 'src/extras/shaders/es2/gooch.vert')
-rw-r--r--src/extras/shaders/es2/gooch.vert17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/extras/shaders/es2/gooch.vert b/src/extras/shaders/es2/gooch.vert
new file mode 100644
index 000000000..dd162a66b
--- /dev/null
+++ b/src/extras/shaders/es2/gooch.vert
@@ -0,0 +1,17 @@
+attribute vec3 vertexPosition;
+attribute vec3 vertexNormal;
+
+varying vec3 worldPosition;
+varying vec3 worldNormal;
+
+uniform mat4 modelMatrix;
+uniform mat3 modelNormalMatrix;
+uniform mat4 mvp;
+
+void main()
+{
+ worldNormal = normalize( modelNormalMatrix * vertexNormal );
+ worldPosition = vec3( modelMatrix * vec4( vertexPosition, 1.0 ) );
+
+ gl_Position = mvp * vec4( vertexPosition, 1.0 );
+}