2012-06-28 20:39:08 +00:00
|
|
|
// -*- mode: C; -*-
|
|
|
|
// Licence: GPL v2
|
|
|
|
// Authors: Frederic Bouvier, Emilian Huminiuc
|
|
|
|
//
|
|
|
|
|
2013-01-17 09:51:23 +00:00
|
|
|
varying float RawPosZ;
|
|
|
|
varying vec3 WorldPos;
|
2012-06-28 20:39:08 +00:00
|
|
|
varying vec3 normal;
|
|
|
|
varying vec3 Vnormal;
|
|
|
|
|
2013-01-17 09:51:23 +00:00
|
|
|
uniform mat4 osg_ViewMatrixInverse;
|
|
|
|
|
2012-06-28 20:39:08 +00:00
|
|
|
void main() {
|
2013-01-17 09:51:23 +00:00
|
|
|
RawPosZ = gl_Vertex.z;
|
|
|
|
WorldPos = (osg_ViewMatrixInverse *gl_ModelViewMatrix * gl_Vertex).xyz;
|
2012-06-28 20:39:08 +00:00
|
|
|
gl_Position = ftransform();
|
|
|
|
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
|
|
|
normal = normalize(gl_Normal);
|
|
|
|
Vnormal = gl_NormalMatrix * gl_Normal;
|
|
|
|
}
|