the two files mikktspace.h and mikktspace.c. These are standalone files which can be redistributed into any other application and regenerate the same tangent spaces. The implementation is independent of the ordering of faces and the vertex ordering of faces.
13 lines
228 B
GLSL
13 lines
228 B
GLSL
|
|
varying vec3 varposition;
|
|
varying vec3 varnormal;
|
|
|
|
void main()
|
|
{
|
|
vec4 co = gl_ModelViewMatrix * gl_Vertex;
|
|
|
|
varposition = co.xyz;
|
|
varnormal = normalize(gl_NormalMatrix * gl_Normal);
|
|
gl_Position = gl_ProjectionMatrix * co;
|
|
|