I have recently noticed that a single cube is using shader keyword LIGHTPROBE_SH when rendering in an empty scene.
My Setup:
- Create an empty project in Unity 2020.4.48 with 3D-Pipeline
- Create a new scene with a Cube with Standard Shader.
- Go to Cube → MeshRenderer and set “Light Probe=Off”
- Open Frame Debugger and see “Draw Mesh Cube” is being render with LIGHTPROBE_SH keyword.
In my larger project, I have skipped LIGHTPROBE_SH from every custom shader, but meshes are still being rendered with this keyword.
Tried Options:
- Check “Lighting” is not using LightProbs
- LightProbes are set to off for all MeshRenderers.
- In my custom shader added “multi compile skip LIGHTPROBE_SH”
- In shader code, added “if(LIGHTPROBE_SH) ndef(LIGHTPROBE_SH) endif”
None of the above methods prevented LIGHTPROBE_SH from being added.
Questions:
- Without adding Light Probe to scene, why this keyword is being used with every renderer?
- How can I prevent?
For my custom shaders, I don’t to keep two variants, one with LIGHTPROBE_SH and another without it.