I’m also looking for this… there doesn’t seem to be an obvious ‘use light probes’ setting for particle effects (either for mesh particles or for regular billboard particles?)

Is this not supported? or is there some way to make it work?

I’m not even looking for per-particle lighting, per-emitter would be just fine - it’s needed for a number of small effects spawned in the world at run-time - to prevent things like smoke/dust from ‘glowing’ if spawned in darker areas.

Well, for now I’ve managed to use GetInterpolatedLightProbe() to manually sample the lightprobes myself from a script, and pass the output into a material.

It more-or-less works, but I’m not sure that I’ve got the maths quite right. I attempted to implement ‘ShadeSH9’ from the shaders in a script, and it took a fair bit of trial-and-improvement to figure out the order of the coefficients - but it’s returning sensible colours - they’re just a lot brighter than expected, by a factor of 4 or so, so I’m having to scale them down by a ‘magic number’ for now.

Is there any sample code showing use of GetInterpolatedLightProbe() for this sort of thing? Or is somebody now going to tell me that there’s a really easy way to get lightprobes to affect particles?

Why don’t you just pass the coefficients directly to the material and work out shading from there. I also can’t say about the order of coefficients but my initial guess is that they should be in order or how they are used in SH9 code from the shader? If they don’t seems like it, then can you let us know what your findings are?

It seems to give reasonable results so long as I scale down the final output by a magic number. But there’s no obvious scaling/clamping going on in the shader implementation.

(For lighting particles, I’m just using a fixed upward-pointing normal at the moment, so I could simplify the calculation for that case, as a lot of the terms are multiplying by a constant zero)

(Which was a simplified version of ShadeSH9, for the case where the normal is 0,1,0)

But while the shader appears to work OK, the code using GetInterpolatedLightProbe is not working properly… results seem to vary dramatically from scene to scene.

Has anyone else had more success with this? - am I just interpreting the coefficient order incorrectly? Or is something else done to these coefficients before passing them to the shader?..

Hmm, I’m trying to just get the constant term to match up, and it’s not working…

I’m comparing the first 3 coefficients returned from GetInterpolatedLightProbe() to the values of ( unity_SHAr.w, unity_SHAg.w, unity_SHAb.w ) from a shader, and they’re not even close to matching up.

Has anyone used GetInterpolatedLightProbe() with any success?

Ignore my above posts. The maths in that early attempt is wrong. The values from GetInterpolatedLightProbe() are not the same values that go into the shader, they need some additional calculations doing first.

I finally got it working, the solution is in this thread: