Primitive sampling

This commit is contained in:
IlyaShurupov 2023-10-18 12:05:01 +03:00 committed by Ilya Shurupov
parent 368ae81251
commit 77db3f4ab5
9 changed files with 242 additions and 80 deletions

View file

@ -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);