mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-12-23 00:10:07 +00:00
Improved mixed partial at Gregory patch corners:
- normalized the rational weights for pairs of interior points - fixed sign swap error in mixed partial of bilinear patches - applied changes to both far/patchBasis and osd/patchBasisCommon
This commit is contained in:
parent
35c1c5f642
commit
647309a7d7
@ -89,8 +89,8 @@ EvalBasisLinear(REAL s, REAL t,
|
||||
|
||||
wDst[0] = 1.0f;
|
||||
wDst[1] = -1.0f;
|
||||
wDst[2] = -1.0f;
|
||||
wDst[3] = 1.0f;
|
||||
wDst[2] = 1.0f;
|
||||
wDst[3] = -1.0f;
|
||||
}
|
||||
}
|
||||
return 4;
|
||||
@ -412,7 +412,11 @@ EvalBasisGregory(REAL s, REAL t,
|
||||
REAL df2 = sC + tC; df2 = (df2 <= 0.0f) ? (REAL)1.0f : (1.0f / df2);
|
||||
REAL df3 = s + tC; df3 = (df3 <= 0.0f) ? (REAL)1.0f : (1.0f / df3);
|
||||
|
||||
REAL G[8] = { s*df0, t*df0, t*df1, sC*df1, sC*df2, tC*df2, tC*df3, s*df3 };
|
||||
// Make sure the G[i] for pairs of interior points sum to 1 in all cases:
|
||||
REAL G[8] = { s*df0, (1.0f - s*df0),
|
||||
t*df1, (1.0f - t*df1),
|
||||
sC*df2, (1.0f - sC*df2),
|
||||
tC*df3, (1.0f - tC*df3) };
|
||||
|
||||
// Combined weights for boundary and interior points:
|
||||
for (int i = 0; i < 12; ++i) {
|
||||
|
@ -65,8 +65,8 @@ Osd_EvalBasisLinear(OSD_REAL s, OSD_REAL t,
|
||||
|
||||
wDst[0] = 1.0f;
|
||||
wDst[1] = -1.0f;
|
||||
wDst[2] = -1.0f;
|
||||
wDst[3] = 1.0f;
|
||||
wDst[2] = 1.0f;
|
||||
wDst[3] = -1.0f;
|
||||
}
|
||||
}
|
||||
return 4;
|
||||
@ -349,7 +349,11 @@ Osd_EvalBasisGregory(OSD_REAL s, OSD_REAL t,
|
||||
OSD_REAL df2 = sC + tC; df2 = (df2 <= 0.0f) ? 1.0f : (1.0f / df2);
|
||||
OSD_REAL df3 = s + tC; df3 = (df3 <= 0.0f) ? 1.0f : (1.0f / df3);
|
||||
|
||||
OSD_REAL G[8] = OSD_ARRAY_8(OSD_REAL, s*df0, t*df0, t*df1, sC*df1, sC*df2, tC*df2, tC*df3, s*df3 );
|
||||
// Make sure the G[i] for pairs of interior points sum to 1 in all cases:
|
||||
OSD_REAL G[8] = OSD_ARRAY_8(OSD_REAL, s*df0, (1.0f - s*df0),
|
||||
t*df1, (1.0f - t*df1),
|
||||
sC*df2, (1.0f - sC*df2),
|
||||
tC*df3, (1.0f - tC*df3) );
|
||||
|
||||
// Combined weights for boundary and interior points:
|
||||
for (int i = 0; i < 12; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user