-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HW2 #10
base: master
Are you sure you want to change the base?
HW2 #10
Conversation
@@ -46,6 +50,7 @@ class CScene | |||
void add(const ptr_camera_t pCamera) | |||
{ | |||
// --- PUT YOUR CODE HERE --- | |||
m_vpCameras.push_back(pCamera); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
active camera should be also modified here
@@ -68,6 +73,12 @@ class CScene | |||
bool intersect(Ray& ray) const | |||
{ | |||
// --- PUT YOUR CODE HERE --- | |||
for (auto prim_ : m_vpPrims) { | |||
if (prim_->intersect(ray)) { | |||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here you find the first intersection instead of finding nearest intersection
shadow.org = ray.dir * ray.t + ray.org; | ||
shadow.t = std::numeric_limits<float>::max(); | ||
Vec3f scene_shade = m_scene.RayTrace(shadow); | ||
return scene_shade; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mirror is not visible on renders
for (auto beam : m_scene.getLights()) { | ||
|
||
if (!beam->illuminate(shadow) && m_scene.occluded(shadow)) { | ||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shadows are not visible on renders
No description provided.