Working on refraction & transparency.

Lots of work left to do!
This commit is contained in:
Godzil
2020-02-21 18:59:14 +00:00
parent 89dd74fa7c
commit df52cb36db
9 changed files with 219 additions and 9 deletions

View File

@@ -198,4 +198,13 @@ TEST(SphereTest, A_sphere_may_be_assigned_a_material)
s.setMaterial(m);
ASSERT_EQ(s.material, m);
}
TEST(SphereTest, A_helper_for_producing_a_sphere_with_a_glassy_material)
{
GlassSphere s = GlassSphere();
ASSERT_EQ(s.transformMatrix, Matrix4().identity());
ASSERT_EQ(s.material.transparency, 1.0);
ASSERT_EQ(s.material.refractiveIndex, 1.5);
}