- fix a face-varying bug in shape_utils : now face-varying UVs are indexed correctly

coming out of our shape format

- set blue component of point-cloud to 0 in face-varying mode (save a few micro-secs)
This commit is contained in:
manuelk 2013-06-07 14:47:41 -07:00
parent 307b353b13
commit cf1b2f1334
2 changed files with 4 additions and 4 deletions

View File

@ -475,8 +475,8 @@ updateGeom() {
case kVARYING : break;
case kFACEVARYING : { g_Q->BindCpuBuffer()[i*6 + 5] = 0.1f;
} break;
case kFACEVARYING : break;
default : break;
}
#if defined(OPENSUBDIV_HAS_OPENMP) and defined(USE_OPENMP)

View File

@ -883,8 +883,8 @@ createFaceVaryingUV( shape const * sh, OpenSubdiv::HbrMesh<T> * mesh) {
OpenSubdiv::HbrFVarData<T> & fvt = e->GetOrgVertex()->GetFVarData(f);
float const * fvdata = &sh->uvs[ sh->faceuvs[idx++] ];
float const * fvdata = &sh->uvs[ sh->faceuvs[idx++]*2 ];
if (not fvt.IsInitialized()) {
fvt.SetAllData(2, fvdata);
} else if (not fvt.CompareAll(2, fvdata)) {