From da81e857a0232aa27e30ba3dfc65c8a9ae42c929 Mon Sep 17 00:00:00 2001 From: Ben Doherty Date: Tue, 9 Jul 2019 16:16:30 -0700 Subject: [PATCH] Correct spherical harmonics comments (#1375) --- libs/image/include/image/KtxBundle.h | 2 +- libs/image/src/KtxBundle.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/image/include/image/KtxBundle.h b/libs/image/include/image/KtxBundle.h index 02fe4ff51e..628fdc3e8a 100644 --- a/libs/image/include/image/KtxBundle.h +++ b/libs/image/include/image/KtxBundle.h @@ -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); diff --git a/libs/image/src/KtxBundle.cpp b/libs/image/src/KtxBundle.cpp index 0fb8d7a2fc..300ab1cda7 100644 --- a/libs/image/src/KtxBundle.cpp +++ b/libs/image/src/KtxBundle.cpp @@ -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);