Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Assignment-2 #5

wants to merge 4 commits into from

Conversation

shahinmv
Copy link

No description provided.

@shahinmv
Copy link
Author

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);
Copy link
Collaborator

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;
Copy link
Collaborator

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);
Copy link
Collaborator

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants