This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
neofx-zoom-plusplus/shader/default.vert

26 lines
837 B
GLSL
Raw Normal View History

2009-12-15 02:25:40 +01:00
varying vec4 diffuse, ambientGlobal, ambient;
varying vec3 normal, pos;
/*varying vec3 normal, lightVector, reflectVector, eyeVector;*/
void main() {
normal = normalize(gl_NormalMatrix * gl_Normal);
pos = vec3(gl_ModelViewMatrix * gl_Vertex);
/*lightVector = vec3(gl_LightSource[0].position - ecPos);
reflectVector = normalize(reflect(-lightVector, normal));
eyeVector = vec3(-ecPos);*/
/* Compute the diffuse, ambient and globalAmbient terms */
diffuse = gl_FrontMaterial.diffuse * gl_LightSource[0].diffuse;
/* The ambient terms have been separated since one of them */
/* suffers attenuation */
ambient = gl_FrontMaterial.ambient * gl_LightSource[0].ambient;
ambientGlobal = gl_LightModel.ambient * gl_FrontMaterial.ambient;
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = ftransform();
}