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: weird

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.

enter image description here


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

cryptography - CBC-MAC decryption, how MAC works in encryption -