filament
filament copied to clipboard
Add support for shadow-casting point lights
Describe the solution you'd like
I'd like to be able to make a point light cast shadows.
Describe alternatives you've considered
I've considered trying to simulate it with a number of spot lights, but didn't get too far. For one thing it runs up against Filament's low number of shadow-casting spot lights. Also, this approach would be easier with "light channels", mentioned as a possible future feature in #3839 . But surely it would be more efficient if the functionality were built in.
Remarks
As I understand it, Filament uses shadow maps for spot light and directional light shadows, which involves rendering a depth map for the scene from the point of view of the light. The obvious way to generalize this for a point light would be to render a cube map. However one could instead render through faces of a tetrahedron. The math would be uglier, but it would be 4 renders instead of 6.
This is something I'd like to add, but won't be a priority right now. I do plan on increasing the cap on shadow-casting spot lights.
Second this request.
See PR #6152