GLSL Phong-Shader Specular artifacts -
i'm having specular issues phong-shader, generates weird output. (pay close attention model's ears): http://i.imgur.com/1n3gyvn.gif
also, has weird behaviour on plane surfaces:
here's shader code: vertex+fragment: http://www.pasteall.org/59832
in line 79 of shader code, change dot(r,e) max(dot(r,e),0.0). it's because don't want give surface shinny when angle between r , e bigger 90 degree shown in attached illustration when eye @ eye2. here, @ section implementing phong shader, provides useful glsl template lambertian lighting model may find useful.
Comments
Post a Comment