Shadows inside a specific cone

Hello there! Is there any way to use a shadow camera without light? I don’t need shadows from point light sources in my game, because they are very CPU-intensive. Instead, I would like to display shadows only inside a specific cone under the source.

Now I use an additional directional light source for this purpose. But I don’t need it to shine. I only want shadows from him. In version 71, there was a property called onlyShadow. Then it disappeared. Is there any other way to make shadows appear only inside a specific cone? Maybe there is such a possibility for a point light source?

Also, I set a helper for a directional light source. How can I make its far value match the far value of the light source itself?

This was already discussed at GitHub here:

tl;dr: What you are looking for is conceptually not possible with classic light sources.


As @Mugen87 said, this may not be technically possible, but there’s a little workaround - see the note at the bottom of this post about HDRIs.

You can try picking up some dark, unlit HDRI and use it as an envmap, and add DirectionalLights. Since HDRI override world lights for PBR materials, directional light shouldn’t affect the scene except for casting shadows.

1 Like