Added refractions and fresnel.

This commit is contained in:
2017-01-02 00:08:22 -04:00
parent c78a8d284f
commit 806040018e
7 changed files with 93 additions and 30 deletions

View File

@@ -13,8 +13,6 @@ vec3 DirectionalLight::shade(vec3 normal, Ray & r, Material & m) const {
float n_dot_l, r_dot_l;
vec3 color, ref;
//color = m.m_ambient * m_ambient;
n_dot_l = max(dot(normal, m_position), 0.0);
color += (m.m_diffuse / pi<float>()) * m_diffuse * n_dot_l;