Assignment 6

Phong Shading

Your browser does not support HTML5
// Compute Phong shading to model Diffuse materials. // Arguments: // intersection_position - position of the intersection (vec3) // intersection_normal - normal at the intersection (vec3) // light_position - position of the light source (vec3) // light_intensity - intensity of the light source (vec3) // ray_origin - origin of the ray (vec3) // kd - diffuse coefficient (vec3) // ks - specular coefficient (vec3) // s - shininess coefficient (float) // Returns: // vec3 - color of the intersection point phong_shading_function = function(intersection_position, intersection_normal, light_position, light_intensity, ray_origin, kd, ks, s){ return vec3.create(); };