Oooh... Dr Phong. I will study your algo and make the darn lights lit!
Basic Light Model
surfaceColor = emissive + ambient + diffuse + specular
All about lights:
- diffuse = object_diffuse * light_diffuse / (distance_to_object * angle)
- ambient = object_ambient * light_ambient
- emissive = object_emissive
- specular = object_specular * light_specular : with size of reflection determined by object_specular_power and distance_to_object and the position of the reflection based on angle.
- final_color = (diffuse + ambient + emissive) * object_texture + specular : with the sum of diffuse, ambient and emissive capped at (1.0, 1.0, 1.0)
BASICS DETAILS OF LIGHTING:
http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter05.html
No comments:
Post a Comment