MAJ
This commit is contained in:
parent
ea2d88c68b
commit
aac95baa7f
|
@ -81,10 +81,11 @@ public class Lighting {
|
||||||
h.normalize();
|
h.normalize();
|
||||||
|
|
||||||
/* diffuse contribution : A COMPLETER */
|
/* diffuse contribution : A COMPLETER */
|
||||||
double Id = kd * ...
|
double Id = light.params[3];
|
||||||
|
double Id = kd *Id* Math.cos(normal,l);
|
||||||
|
|
||||||
/* specular contribution : A COMPLETER */
|
/* specular contribution : A COMPLETER */
|
||||||
double Is = ks * ...
|
double Is = ks * Id * Math.cos(h,normal)^2;
|
||||||
|
|
||||||
I += Id + Is;
|
I += Id + Is;
|
||||||
} catch (InstantiationException ex) {
|
} catch (InstantiationException ex) {
|
||||||
|
|
Loading…
Reference in a new issue