Open jmiskovic opened 5 months ago
There's shader.glsl
in this repo that can be included to get the evaluateSH
function. (The linked code doesn't use it because then the library would depend on an extra file and it's not clear what the include path should be).
LÖVR currently has an evaluateSphericalHarmonics
function in shaders, but it only works with filament's pre-scaled coefficients so it won't work properly with these.
Given all that, it still might make sense to replace the evaluateSphericalHarmonics
helper with this evaluateSH
function because: A) it makes this library easier to use since you don't need to copy shader.glsl and B) it's confusing to have 2 different SH evaluators floating around.
Maybe
evaluateSH()
(link) should be made a part oflovr.glsl
? It would make it easy to integrate with custom shaders, since you rarely want just the light probe.