mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-25 04:50:06 +00:00
Fix Far::StencilTablesFactory introduced in re-factor
- big stencil initialization was incorrect
This commit is contained in:
parent
8e5426d93e
commit
f1ac01ca84
@ -86,9 +86,11 @@ public:
|
||||
// Adds the contribution of a supporting vertex that was not yet
|
||||
// in the stencil
|
||||
void PushBackVertex(Index stencil, Index vert, float weight) {
|
||||
assert(weight!=0.0f);
|
||||
unsigned char & size = _sizes[stencil];
|
||||
Index idx = stencil * _maxsize + size;
|
||||
Index idx = stencil*_maxsize;
|
||||
if (size < (_maxsize-1)) {
|
||||
idx += size;
|
||||
_indices[idx] = vert;
|
||||
_weights[idx] = weight;
|
||||
} else {
|
||||
@ -210,10 +212,11 @@ public:
|
||||
|
||||
void PushBackVertex(Index stencil,
|
||||
Index vert, float weight, float tan1Weight, float tan2Weight) {
|
||||
|
||||
assert(weight!=0.0f);
|
||||
unsigned char & size = this->_sizes[stencil];
|
||||
Index idx = stencil * this->_maxsize + size;
|
||||
Index idx = stencil*this->_maxsize;
|
||||
if (size < (this->_maxsize-1)) {
|
||||
idx += size;
|
||||
this->_indices[idx] = vert;
|
||||
this->_weights[idx] = weight;
|
||||
this->_tan1Weights[idx] = tan1Weight;
|
||||
|
Loading…
Reference in New Issue
Block a user