playcanvas / playcanvas/engine
Spotlight shadows bleed when using clustered lighting
@mvaligursky is already working on this.
Since Oct 20, 2025.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
When using clustered lighting, spotlight shadows bleed light around the cone edges. It's especially noticeable when using similar inner and outer cone angles. In the example below, both cone angles are set to 20. I have to lower the inner cone angle to around 15 for the bleed to disappear (different values needed on different devices).
| Clustered lighting disabled | Clustered lighting enabled |
|---|---|
The amount of bleed increases as the outer cone angle is lowered, as visible in this video.
https://github.com/user-attachments/assets/87676d17-3e1e-4105-9e43-a46d99eaac8f
We noticed this while working with spotlights that we wanted to project orthographic-ish light cookies. This issue hinders us from doing so, since we can't seem to find a cone angle that doesn't bleed on any device.
Test project: https://playcanvas.com/project/1408857/overview/spotlight-shadow-bleed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.