You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Triangle::GetShadingGeometry the shading tangents ss and ts are calculated, but it seems they have the wrong direction, they point in the opposite direction of dpdu and dpdv.
ss = Normalize(dg.dpdu);
ts = Cross(ss, ns);
ss = Cross(ts, ns);
After the above cross products ss points in the opposite direction of dpdu and ts points in the opposite direction of dpdv. But ss is used as dpdu and ts as dpdv in the shading DifferentialGeometry.
p1 = p0 + u * dpdu + v * dpdv;
// using ss and ts in this formula results in p1 lying in the opposite direction
I have checked the code in pbrt-v4 and there the first formula was changed to ts = Cross(ns, ss); which fixes the problem (pbrt-v3 has the same problem).
Is this correct?
The text was updated successfully, but these errors were encountered:
In
Triangle::GetShadingGeometry
the shading tangents ss and ts are calculated, but it seems they have the wrong direction, they point in the opposite direction of dpdu and dpdv.After the above cross products ss points in the opposite direction of dpdu and ts points in the opposite direction of dpdv. But ss is used as dpdu and ts as dpdv in the shading
DifferentialGeometry
.p1 = p0 + u * dpdu + v * dpdv; // using ss and ts in this formula results in p1 lying in the opposite direction
I have checked the code in pbrt-v4 and there the first formula was changed to
ts = Cross(ns, ss);
which fixes the problem (pbrt-v3 has the same problem).Is this correct?
The text was updated successfully, but these errors were encountered: