Primitive sampling
This commit is contained in:
parent
97f79a6483
commit
414d4e6411
9 changed files with 242 additions and 80 deletions
|
|
@ -35,6 +35,10 @@ bool TrigCache::castRay(const Ray& ray) const {
|
|||
static halnf a, f, u, v;
|
||||
static halnf t;
|
||||
|
||||
if (ray.dir.dot(mNormal) > 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
h = ray.dir.cross(mEdgeP1P3);
|
||||
a = mEdgeP1P2.dot(h);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue