Area lights fixed.

This commit is contained in:
Miguel Angel Astor Romero
2017-02-13 16:14:17 -04:00
parent a5b7fc0406
commit e485ce2cda
6 changed files with 9 additions and 9 deletions

View File

@@ -14,7 +14,7 @@ float d, att, ln_dot_d, d2, g;
l_dir = normalize(direction(i_pos));
ln_dot_d = dot(-m_n_at_last_sample, l_dir);
if (ln_dot_d > 0.0f) {
d2 = glm::distance(m_last_sample, i_pos);
d2 = distance(i_pos);
d2 *= d2;
g = ln_dot_d / d2;
d = distance(i_pos);