materials: small correction to specular computation.
This commit is contained in:
parent
bad54bb433
commit
6863b4ecd6
@ -119,7 +119,7 @@ pub fn lighting(
|
|||||||
// from the eye.
|
// from the eye.
|
||||||
let reflectv = reflect(-lightv, normalv);
|
let reflectv = reflect(-lightv, normalv);
|
||||||
let reflect_dot_eye = dot(reflectv, eyev);
|
let reflect_dot_eye = dot(reflectv, eyev);
|
||||||
let specular = if reflect_dot_eye < 0. {
|
let specular = if reflect_dot_eye <= 0. {
|
||||||
BLACK
|
BLACK
|
||||||
} else {
|
} else {
|
||||||
// Compute the specular contribution.
|
// Compute the specular contribution.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user