24 lines
570 B
Plaintext
24 lines
570 B
Plaintext
attribute vec4 in_vertex;
|
|
attribute vec3 in_normal;
|
|
attribute vec4 in_tangent;
|
|
|
|
varying vec3 npos;
|
|
varying vec3 normal, binormal, tangent;
|
|
varying vec2 uv;
|
|
|
|
void main()
|
|
{
|
|
normal = normalize(gl_NormalMatrix * in_normal);
|
|
tangent = normalize(gl_NormalMatrix * in_tangent.xyz);
|
|
binormal = normalize(gl_NormalMatrix * cross(normal, in_tangent.xyz * in_tangent.w));
|
|
|
|
vec4 localVert = in_vertex;
|
|
localVert.y *= 0.2;
|
|
|
|
vec4 pos = gl_ModelViewMatrix * localVert;
|
|
npos = -pos.xyz;
|
|
|
|
uv = in_vertex.xz;
|
|
gl_Position = gl_ProjectionMatrix * pos;
|
|
}
|