mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2025-01-08 07:40:17 +00:00
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:
parent
aad523a4d7
commit
8b302f652e
@ -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
|
||||
|
@ -702,7 +702,6 @@ PatchTableFactory::computePatchParam(
|
||||
|
||||
if (nonquad) {
|
||||
ptexIndex+=childIndexInParent;
|
||||
--depth;
|
||||
}
|
||||
|
||||
PatchParam param;
|
||||
|
Loading…
Reference in New Issue
Block a user