Texture filtering on normal and specular maps

Started by
9 comments, last by newObjekt 11 years ago

So I've gotten some pretty good results by making changes to how normals and stuff are calculated.

http://inferno.codebrainshideout.net/Images/specular%20n%20stuff.png

Does this look alright to you guys?

I also would really like to make the specular light change based on the angle the player is looking at things from.

I was thinking

vec3 vertexNormal;

vec3 lightDirection;

vec3 cameraDirection;

vec3 a = reflect(lightDirection, vertexNormal);

float shininess = pow(max(dot(a, cameraDirection), 2);

But I don't know how to get the camera direction and I don't know if the GLSL reflect works like that.

This topic is closed to new replies.

Advertisement