Fix spherical harmonics parsing (#1370)

This commit is contained in:
Ben Doherty
2019-07-02 12:54:52 -07:00
committed by GitHub
parent 2bfea16459
commit cc4e9db81b
3 changed files with 59 additions and 2 deletions

View File

@@ -292,7 +292,8 @@ bool KtxBundle::getSphericalHarmonics(filament::math::float3* result) {
return false;
}
float* flat = &result->x;
for (int i = 0; i < 9; i++) {
// 9 bands of 3 coefficients
for (int i = 0; i < 9 * 3; i++) {
char* next;
*flat++ = std::strtof(src, &next);
if (next == src) {