diff options
Diffstat (limited to 'ground.vert')
-rw-r--r-- | ground.vert | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ground.vert b/ground.vert new file mode 100644 index 0000000..a1e3dd9 --- /dev/null +++ b/ground.vert @@ -0,0 +1,28 @@ +/*uniform vec3 light_eye; +varying vec2 texcoord; +varying vec3 light_surf; +varying vec3 eye_surf; +varying vec3 tangent_surf; +*/ +uniform mat4 mvp, mv; + +void main() +{ +/* vec3 t = (mv * vec4(1.0,, 0.0)).xyz; + vec3 n = (mv * vec4(gl_Normal, 0.0)).xyz; +*/ + gl_Position = mvp * gl_Vertex; +/* + mat3 tbn = mat3(t, + cross(n, t), + n + ); + + vec3 vertex_eye = vec3(mv * gl_Vertex); + + texcoord = vec2(gl_MultiTexCoord0.x * 4, gl_MultiTexCoord0.y); + light_surf = normalize((light_eye - vertex_eye) * tbn); + eye_surf = normalize((-vertex_eye) * tbn); + tangent_surf = gl_MultiTexCoord1.xyz * tbn; +*/ +} |