Correct spherical harmonics comments (#1375)

This commit is contained in:
Ben Doherty
2019-07-09 16:16:30 -07:00
committed by GitHub
parent 111b3320c0
commit da81e857a0
2 changed files with 2 additions and 2 deletions

View File

@@ -106,7 +106,7 @@ public:
/**
* Parses the key="sh" metadata and returns 3 bands of data.
*
* Assumes 9 bands for a total of 27 coefficients.
* Assumes 3 bands for a total of 9 RGB coefficients.
* Returns true if successful.
*/
bool getSphericalHarmonics(filament::math::float3* result);

View File

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