2010-03-16 07:21:47 +00:00
|
|
|
// -*- mode: C; -*-
|
|
|
|
// Licence: GPL v2
|
2010-03-20 18:00:26 +00:00
|
|
|
// Author: Frederic Bouvier
|
2016-08-05 11:16:23 +00:00
|
|
|
#version 120
|
2010-03-16 07:21:47 +00:00
|
|
|
|
2012-02-14 16:38:18 +00:00
|
|
|
//varying float fogCoord;
|
2010-03-20 18:00:26 +00:00
|
|
|
varying vec3 VNormal;
|
|
|
|
varying vec3 VTangent;
|
|
|
|
varying vec3 VBinormal;
|
2010-03-16 07:21:47 +00:00
|
|
|
|
2010-03-20 18:00:26 +00:00
|
|
|
attribute vec3 tangent;
|
|
|
|
attribute vec3 binormal;
|
2010-03-16 07:21:47 +00:00
|
|
|
|
2010-03-20 18:00:26 +00:00
|
|
|
void main (void)
|
2010-03-16 07:21:47 +00:00
|
|
|
{
|
2012-02-14 16:38:18 +00:00
|
|
|
// vec4 pos = gl_ModelViewMatrix * gl_Vertex;
|
|
|
|
// fogCoord = pos.z / pos.w;
|
2011-02-16 08:48:58 +00:00
|
|
|
|
2010-03-20 18:00:26 +00:00
|
|
|
VNormal = normalize(gl_NormalMatrix * gl_Normal);
|
|
|
|
VTangent = normalize(gl_NormalMatrix * tangent);
|
|
|
|
VBinormal = normalize(gl_NormalMatrix * binormal);
|
2011-02-16 08:48:58 +00:00
|
|
|
|
|
|
|
gl_FrontColor = gl_FrontLightModelProduct.sceneColor + gl_LightSource[0].ambient * gl_FrontMaterial.ambient;
|
2010-03-20 18:00:26 +00:00
|
|
|
gl_TexCoord[0] = gl_MultiTexCoord0;
|
|
|
|
gl_Position = ftransform();
|
2010-03-16 07:21:47 +00:00
|
|
|
}
|