mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
Fix mat world it nan v3.3.0 (#9133)
* fix MatWorldIT will be used Nan for v3.3 * update
This commit is contained in:
committed by
GitHub
parent
6c53d88327
commit
977c19dd1e
@@ -355,7 +355,7 @@ export class Model {
|
||||
if (!JSB) {
|
||||
// fix precision lost of webGL on android device
|
||||
// scale worldIT mat to around 1.0 by product its sqrt of determinant.
|
||||
const det = Mat4.determinant(m4_1);
|
||||
const det = Math.abs(Mat4.determinant(m4_1));
|
||||
const factor = 1.0 / Math.sqrt(det);
|
||||
Mat4.multiplyScalar(m4_1, m4_1, factor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user