Question by
neroid · Aug 20, 2020 at 03:49 PM ·
light probes
How to pass 4 spherical harmonics data to a mesh renderer.
Im making a structure similar to the light probes system, which works nicely, except the fact that passing spherical harmonics through the material block didnt really seem to work as intended.
I made a 4 count array of type spherical harmonics l2 and populated it with diverse stuff and then just tried to pass it on the renderer through the usage of materialPropertyBlock.CopySHCoefficientArraysFrom(sphericalHarmonicsArray);
and then gameObject.GetComponent<MeshRenderer>().SetPropertyBlock(materialPropertyBlock);
So what am i doing wrong here, and how could i pass and merge 4 spherical harmonics and pass them on the mesh renderer?
Comment