Custom light probe data

Is there any documentation around providing custom light probe data for a MeshRenderer when using the URP? This functionality exists as part of the Standard pipeline ( Unity - Scripting API: Rendering.LightProbeUsage.CustomProvided ) but involves using MaterialPropertyBlocks. After reading about the new SRP Batcher, I can’t see how this would work with the new CBUFFER way of doing things, and can’t see how that would actually make it into the correct bit of the URP lit shader.

Is there any examples of this out there?

Thanks

Sorry for necroing this thread, but I’ve just run into the same issue. There doesn’t seem to be any official/unofficial explanation on how to do this. Anyone?

Sadly I didn’t find a solution to this, so I’m still stuck on the Standard pipeline. :frowning:

What i’ve gathered from unity’s srp batcher benchmark is that you can just set parameters on a material e.g. material.SetColor(“_BaseColor”, Color.black). This does create material instances but since these values are already in a cbuffer, this won’t break SRP Batcher. The problem arises with light probes however as you can’t just set built in values that way. So still waiting for a response from unity on whether custom light probes are supported at all by the srp batcher.

I tested the above method with a custom variable name and it does indeed work. However, setting light probes on a mesh renderer to custom seems to automagically disable srp batching. So you can only make custom lightprobes work with srp batcher by creating a custom shader as of today. Unity’s built in shaders won’t work.

2 Likes

I stumbled across this thread while searching for information about custom lightprobes as well. According to the URP feature comparison table they are officially supported, but I can’t find anything on how to do it properly. I managed to make it work using a MaterialPropertyBlock, but obviously you are not supposed to use them with URP, as this breaks batching. So what is the official way to use custom lightprobe data with URP?

did anyone ever get an update about this?

Bump.

Bumping this as well ! I actually would love to see more options and scripting access when working with SH. For example i couldn’t figure out how to adjust individual light probes within a group (tried with this tool: GitHub - kemalakay/lightprobes: Light Probe Intensity Adjustment Tool for Unity3D).

1 Like