You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mData.nbColumns is of type PxReal so the index computation is done in PxReal and only then cast to PxU32. This leads to problems when x, z and nbColumns have large values (~4k x 4k).
A suggested fix is to either use mData.columns like the line below or cast mData.nbColumns directly using PxU32(mData.nbColumns).
A pull request for the same issue was submitted for PhysX 4.1 ( NVIDIAGameWorks/PhysX#574 ) but the modifications that were applied for PhysX 5.1 (the final cast to PxU32) do not fix the problem.
The text was updated successfully, but these errors were encountered:
Nodli
changed the title
Precision issue in index computation in Gu::HeightField::computeCellCoordinates (PxF32 to PxU32)
Precision issue in index computation in Gu::HeightField::computeCellCoordinates (PxReal to PxU32)
Nov 30, 2022
Library and Version
PhysX v5.1.0
Release 104.0
Issue
Hi,
There is a precision issue in the computation of the vertex index in Gu::HeightField::computeCellCoordinates.
PhysX/physx/source/geomutils/src/hf/GuHeightField.cpp
Line 729 in 8c2791a
mData.nbColumns is of type PxReal so the index computation is done in PxReal and only then cast to PxU32. This leads to problems when x, z and nbColumns have large values (~4k x 4k).
A suggested fix is to either use mData.columns like the line below or cast mData.nbColumns directly using PxU32(mData.nbColumns).
A pull request for the same issue was submitted for PhysX 4.1 ( NVIDIAGameWorks/PhysX#574 ) but the modifications that were applied for PhysX 5.1 (the final cast to PxU32) do not fix the problem.
The text was updated successfully, but these errors were encountered: