Closed yuebingzero closed 7 years ago
Hi, Thanks for pointing that out, however I think that the code is correct. Did you notice any particular problem in the simulation? I'll add some comments to make it easier to understand:
// set invMass to zero if radius is zero (xyz will be unchanged)
// curPos.w = radius > 0 ? curPos.w : 0
// the first three components are compared against -FLT_MAX which is always true
curPos0 = curPos0 & (splat<0>(radius) > sMinusFloatMaxXYZ);
curPos1 = curPos1 & (splat<1>(radius) > sMinusFloatMaxXYZ);
curPos2 = curPos2 & (splat<2>(radius) > sMinusFloatMaxXYZ);
curPos3 = curPos3 & ((radius) > sMinusFloatMaxXYZ);
// we don't have to splat the last one as the 4th element is already in the right place
Note that clothing in PhysX is deprecated, so this change will only be made in NvCloth.
In PhysX-3.4\PhysX_3.4\Source\LowLevelCloth\src\SwSolverKernel.cpp, line 209
why not ?