Added movement controls
This commit is contained in:
parent
d9f44af7ae
commit
a407f8b9ed
5 changed files with 62 additions and 32 deletions
|
@ -2,7 +2,6 @@ uniform sampler2D tex;
|
|||
|
||||
varying vec4 diffuse, ambientGlobal, ambient;
|
||||
varying vec3 normal, pos;
|
||||
/*varying vec3 normal, lightVector, reflectVector, eyeVector;*/
|
||||
|
||||
|
||||
void main() {
|
||||
|
|
|
@ -1,22 +1,14 @@
|
|||
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;
|
||||
|
||||
|
|
Reference in a new issue