Question: 8. The following code is written in GLSL vec2 illumination(float lightInt, float Ka, float Kd, float Ks, float sh) vec3 nl-normalize(-vl); vec3 n2-normalize(v2); vec3 n3-normalize(v3);

 8. The following code is written in GLSL vec2 illumination(float lightInt,

8. The following code is written in GLSL vec2 illumination(float lightInt, float Ka, float Kd, float Ks, float sh) vec3 nl-normalize(-vl); vec3 n2-normalize(v2); vec3 n3-normalize(v3); vec3 n4 normalize(nl+n2); float diffuse Ka Kd * lightInt max(0.0, dot(n3, n2)); float spec Ks * pow(max(0.0, dot(n3.n4)), sh); return vec2(diffuse, spec): Name the illumination model. Among vl, v2, v3, which variable is the position, which is the normal, and which is the light source direction? What is the quantity the float number sh is describing? (10pts) 8. The following code is written in GLSL vec2 illumination(float lightInt, float Ka, float Kd, float Ks, float sh) vec3 nl-normalize(-vl); vec3 n2-normalize(v2); vec3 n3-normalize(v3); vec3 n4 normalize(nl+n2); float diffuse Ka Kd * lightInt max(0.0, dot(n3, n2)); float spec Ks * pow(max(0.0, dot(n3.n4)), sh); return vec2(diffuse, spec): Name the illumination model. Among vl, v2, v3, which variable is the position, which is the normal, and which is the light source direction? What is the quantity the float number sh is describing? (10pts)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!