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

HW2 #10

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

HW2 #10

wants to merge 4 commits into from

Conversation

SHOROUKAWWAD
Copy link

No description provided.

@@ -46,6 +50,7 @@ class CScene
void add(const ptr_camera_t pCamera)
{
// --- PUT YOUR CODE HERE ---
m_vpCameras.push_back(pCamera);
Copy link
Collaborator

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

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

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

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

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