Cleaned up Far::PatchParam initialization

The parameterization of irregular faces is offset by one level
of refinement from the parameterization of regular faces. This
matches the parameterization used for Ptex texture mapping onto
irregular faces.

This was expressed awkwardly during the assigment of values to
Far::PatchParam, where we pre-decremented the refinement level
for non-quad patches in order to compensate for the incorrect
pre-increment of the refinement depth value stored for non-quad
patches.
This commit is contained in:
David G Yu 2016-08-24 09:53:52 -07:00
parent aad523a4d7
commit 8b302f652e
2 changed files with 1 additions and 2 deletions

View File

@ -135,7 +135,7 @@ PatchParam::Set( Index faceid, short u, short v,
((v & 0x3ff) << 12) |
((boundary & 0xf) << 8) |
((nonquad ? 1:0) << 4) |
(nonquad ? depth+1 : depth);
(depth);
}
inline float

View File

@ -702,7 +702,6 @@ PatchTableFactory::computePatchParam(
if (nonquad) {
ptexIndex+=childIndexInParent;
--depth;
}
PatchParam param;