fix: forgot to square something
This commit is contained in:
parent
047b613e03
commit
aa3c813795
|
@ -85,7 +85,7 @@ public class Lighting {
|
|||
double I_diff = Id * kd * Math.cos(normal.dot(l));
|
||||
|
||||
/* specular contribution */
|
||||
double I_spec = Id * ks * Math.cos(h.dot(normal));
|
||||
double I_spec = Id * ks * Math.pow(Math.cos(h.dot(normal)), 2);
|
||||
|
||||
I += I_diff + I_spec;
|
||||
} catch (InstantiationException ex) {
|
||||
|
|
Loading…
Reference in a new issue