This commit is contained in:
Pierre-Eliot Jourdan 2022-04-14 10:03:19 +00:00
parent ea2d88c68b
commit aac95baa7f

View file

@ -81,10 +81,11 @@ public class Lighting {
h.normalize();
/* diffuse contribution : A COMPLETER */
double Id = kd * ...
double Id = light.params[3];
double Id = kd *Id* Math.cos(normal,l);
/* specular contribution : A COMPLETER */
double Is = ks * ...
double Is = ks * Id * Math.cos(h,normal)^2;
I += Id + Is;
} catch (InstantiationException ex) {