-
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
Assignment-2 #5
base: master
Are you sure you want to change the base?
Assignment-2 #5
Conversation
Uploaded only the modified src files and renders folder containing rendered images. |
@@ -77,7 +93,7 @@ class CScene | |||
bool occluded(Ray& ray) | |||
{ | |||
// --- PUT YOUR CODE HERE --- | |||
return false; | |||
return intersect(ray); |
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.
Might be optimized here...
*/ | ||
for (auto i = m_vpPrims.begin(); i != m_vpPrims.end(); i++) { | ||
if ((*i)->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.
you exit the method once the first intersection was found - but you need to find the nearest one!
Vec3f direction = m_org - ray.org; | ||
Vec3f intensity = m_intensity / pow(cv::norm(direction), 2); | ||
ray.dir = normalize(direction); | ||
return normalize(intensity); |
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.
Intensity should not be normalized...
No description provided.