This repository was archived by the owner on Dec 12, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ int main()
3636
3737 // ---------------------------------------------------------------------------------------------
3838 std::cout << " Loading Scene...." ;
39- Scene scene (" assets/scene1 .txt" );
39+ Scene scene (" assets/scene2 .txt" );
4040 std::cout << " COMPLETE!" << std::endl;
4141
4242 scene.Display ();
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ void Scene::GenerateScene()
171171 }
172172
173173 m_Img.normalize (0 , 255 );
174- m_Img.save (" render .bmp" , true );
174+ m_Img.save (" render2 .bmp" , true );
175175}
176176
177177Scene::IntersectingObject Scene::FindNearestIntersectingObject (glm::vec3 ray_dir)
@@ -212,7 +212,7 @@ Scene::IntersectingObject Scene::FindNearestIntersectingObject(glm::vec3 ray_dir
212212bool Scene::IsLightObstructed (Light* light, IntersectingObject* target)
213213{
214214 glm::vec3 lightRay = glm::normalize (light->GetPosition () - target->m_Point );
215- glm::vec3 lightRayWithBias = target-> m_Point + LIGHT_BIAS * lightRay;
215+ glm::vec3 lightRayWithBias = ( LIGHT_BIAS * lightRay) + target-> m_Point ;
216216
217217 float distance;
218218 glm::vec3 intersectpoint;
You can’t perform that action at this time.
0 commit comments