Spotlight gives wrong result

The light is currently set at 0 outer cone and yet the light is still showing up. How do I prevent this. Also, the game is now very laggy when it wasnt around 2 months ago and I have changed nothing. Game cannot be updated on itch with this problem so I will have to either find a fix or wait until the engine is fixed.

Hi @ALUCARD! Can you try recreating your spotlight to see if this solves your problem?

Can you please supply a link to the project or a fork to the project that we can look at please?

Junk dont steal | Editor (

so i tried creating a new light but for some reason the light inverts at 40 degrees. Sometimes it fixes itself randomly but still doesnt go to 0 properly. Might be a problem with the numbers itself as earlier i noticed that the rotation for the texture doesnt go to 0.

If I change the inner cone to any number the light corrects itself but stays too large. Its a problem with the inner cone not accepting 0 just like the texture rotation not accepting 0. I think thats what the problem is.

Thanks for the clue and repro.

This looks like a bug to do with clustered lighting and I’ve managed to replicate it in a small, new project:

In you case, the current workarounds are:

  • When you make the light cones 0 and 0, disable the entity or light component as the idea is to have no light emitting
  • As you have only 2 lights in the scene, not sure about your other scenes, disable clustered lighting in project settings (under Rendering). As long as you have less than 5 or so lights in each scene of your game, this should be fine

As a side note, clustered lighting is to optimise runtime performance for apps and games that have many changing lights (up to 254). We’ve set it as the default option for new projects few months ago as usually, there’s no reason not to use it. (barring bugs like this)

This has been fixed since it was last reported. Are you still seeing this issue?

No I was just saying I think its similar and perhaps caused by the same thing whatever it is.

Ah, no it’s a separate issue and been fixed in this PR Spot lights with zero size outer cone are filtered out from clustered lights by mvaligursky · Pull Request #4864 · playcanvas/engine · GitHub

That should go out in the next engine release

Also changing the clustered lights off seems to destroy the specular as every specular value other than 000000 just turns completely white. It seems to completely ignore the specular and only care about the color of whatever light is hitting it as I was able to turn all specular objects red just by changing the light source to red regardless of whatever the specular is supposed to be.

Is this the issue?

With Clustered Lighting:


looks like it

1 Like