Final solution for Assignment 2
This commit is contained in:
parent
d26a2309c7
commit
a2d7f5c414
2 changed files with 5 additions and 4 deletions
BIN
Assignments/Assignment2.zip
Normal file
BIN
Assignments/Assignment2.zip
Normal file
Binary file not shown.
|
|
@ -265,11 +265,11 @@ Vec3fa Application2::renderPixelHeterogeneousNEE(float x, float y, const ISPCCam
|
|||
L += Lw * absorbtion * emissive;
|
||||
Lw *= 1.0 - absorbtion;
|
||||
|
||||
ray = Ray(ray.org + t * ray.dir,o,EPS,inf);
|
||||
ray = Ray(ray.org + t * ray.dir,o,0.0,inf);
|
||||
|
||||
} else {
|
||||
// printf("volume(%f,%f,%f), t: %f, tfar: %f\n", ray.org.x, ray.org.y, ray.org.z, t, ray.tfar);
|
||||
ray = Ray(ray.org + t * ray.dir, ray.dir, EPS, inf);
|
||||
ray = Ray(ray.org + t * ray.dir, ray.dir, 0.0, inf);
|
||||
i--;
|
||||
}
|
||||
|
||||
|
|
@ -347,6 +347,7 @@ Vec3fa Application2::renderPixelHeterogeneous(float x, float y, const ISPCCamera
|
|||
if (ray.geomID == RTC_INVALID_GEOMETRY_ID) {
|
||||
// printf("here(%f,%f,%f)\n", ray.org.x, ray.org.y, ray.org.z);
|
||||
break;
|
||||
// return Vec3fa(0.0, 0.0, 10.0);
|
||||
}
|
||||
|
||||
float r = RandomSampler_get1D(sampler);
|
||||
|
|
@ -381,11 +382,11 @@ Vec3fa Application2::renderPixelHeterogeneous(float x, float y, const ISPCCamera
|
|||
L += Lw * absorbtion * emissive;
|
||||
Lw *= 1.0 - absorbtion;
|
||||
|
||||
ray = Ray(ray.org + t * ray.dir,o,EPS,inf);
|
||||
ray = Ray(ray.org + t * ray.dir,o,0.0,inf);
|
||||
|
||||
} else {
|
||||
// printf("volume(%f,%f,%f), t: %f, tfar: %f\n", ray.org.x, ray.org.y, ray.org.z, t, ray.tfar);
|
||||
ray = Ray(ray.org + t * ray.dir, ray.dir, EPS, inf);
|
||||
ray = Ray(ray.org + t * ray.dir, ray.dir, 0.0, inf);
|
||||
i--;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue