update to Filament libs with inverse bind matrices

This commit is contained in:
Nick Fisher
2022-12-19 10:46:21 +08:00
parent edc95ae628
commit 87e4935864
44 changed files with 516 additions and 84 deletions

View File

@@ -588,6 +588,26 @@ constexpr mat4f highPrecisionMultiply(mat4f const& lhs, mat4f const& rhs) noexce
};
}
// mat4 * float4, with double precision intermediates
constexpr double4 highPrecisionMultiplyd(mat4f const& lhs, float4 const& rhs) noexcept {
double4 result{};
result += lhs[0] * rhs[0];
result += lhs[1] * rhs[1];
result += lhs[2] * rhs[2];
result += lhs[3] * rhs[3];
return result;
}
// mat4 * mat4, with double precision intermediates
constexpr mat4 highPrecisionMultiplyd(mat4f const& lhs, mat4f const& rhs) noexcept {
return {
highPrecisionMultiplyd(lhs, rhs[0]),
highPrecisionMultiplyd(lhs, rhs[1]),
highPrecisionMultiplyd(lhs, rhs[2]),
highPrecisionMultiplyd(lhs, rhs[3])
};
}
// ----------------------------------------------------------------------------------------
} // namespace math
} // namespace filament