unity_ProbeVolumeSH using a sampler slot?

After updating to Unity 5.4.0 I’ve found that one of my shaders is now execeeding its sampler limit (“…maximum ps_4_0 sampler register index (16) exceeded…”).

Using the Frame Debugger I can see there is a new sampler being used called “unity_ProbeVolumeSH” which I guess has appeared because of the new Light Probe changes in 5.4.0 (?). I am not using any Light Probes in my scene and setting “Light Probes” property on the Mesh Renderer to “Off” has no effect (you can test this yourself with a regular Unity Cube). General fiddling about with the Lighting settings also hasn’t removed it.

Does anyone know how to remove this new “unity_ProbeVolumeSH” sampler?

Cheers

You might be able to disable support by adding this:

#define UNITY_LIGHT_PROBE_PROXY_VOLUME 0

1 Like

That’s removed it, cheers!

This is the exact code I used if anyone else has the problem (taken from Unity Issue Tracker - [Regression][5.4][RTP] RTP Terrain shader rendering is broken after upgrading project to 5.4):

#if defined(UNITY_LIGHT_PROBE_PROXY_VOLUME)
#undef UNITY_LIGHT_PROBE_PROXY_VOLUME
#endif
#define UNITY_LIGHT_PROBE_PROXY_VOLUME 0
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"