Use new cgi source.
This commit is contained in:
parent
57ae058d9a
commit
20cc279b72
158 changed files with 157 additions and 92879 deletions
|
|
@ -52,10 +52,22 @@ namespace embree {
|
|||
Light_EvalRes QuadLight_eval(const Light* super,
|
||||
const Sample& dg,
|
||||
const Vec3fa& dir) {
|
||||
|
||||
const QuadLight* self = (QuadLight*)super;
|
||||
Light_EvalRes res;
|
||||
res.value = Vec3fa(0, 0, 0);
|
||||
res.dist = inf;
|
||||
res.pdf = 0.f;
|
||||
|
||||
Vec3fa normal = normalize(cross(self->edge2, self->edge1)); // Recalculate normal for safety
|
||||
float dotProd = dot(normal, dir);
|
||||
|
||||
if (dotProd > 0) {
|
||||
res.value = self->radiance;
|
||||
res.dist = 0.f;
|
||||
res.pdf = self->ppdf;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue