diff --git a/src/scene.cpp b/src/scene.cpp index 50a9de3..602d605 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -191,14 +191,14 @@ std::optional cast_scene(const Ray ray, Scene& scene, const bool us if (depth > max_depth) return {}; - const std::function scene_func = use_bvh ? test_scene_octree : test_scene; + const auto scene_func = use_bvh ? test_scene_octree : test_scene; if (auto hit = scene_func(ray, scene)) { const float diffuse = lighting::point_light(hit->position, light_position, hit->normal); SceneResult result = {}; // direct lighting calculation - // currently only supports only one light (directional) + // currently only supports one light (directional) if (glm::dot(light_position - hit->position, hit->normal) > 0) { const glm::vec3 light_dir = glm::normalize(light_position - hit->position);