playcanvas / playcanvas/engine
Implement clustered lighting as a main lighting system (Root ticket)
Open
@mvaligursky is already working on this.
Since Sep 27, 2021.
area: graphics
enhancement
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
This is the issue to track progress for the clustered lighting implementation in the engine. Here are the most important steps:
- Core tech prototype and architecture: https://github.com/playcanvas/engine/pull/2990
- Spot light shadows: https://github.com/playcanvas/engine/pull/3235
- Spot light cookies: https://github.com/playcanvas/engine/pull/3521
- Omni light shadows using the same shadow atlas as spot lights https://github.com/playcanvas/engine/pull/3537
- Omni light cookies using the same cookie atlas as spot lights https://github.com/playcanvas/engine/pull/3555
- Complete lighting model specular: https://github.com/playcanvas/engine/pull/3668
- Add support for area lights https://github.com/playcanvas/engine/pull/3691
- Shadow filtering options on top of default PCF3 https://github.com/playcanvas/engine/pull/3763
- Smarter texture atlas slot assignment https://github.com/playcanvas/engine/pull/3895
- Lightmapper update to use clustered lights https://github.com/playcanvas/engine/pull/3902
- Remove old lighting system (shader recompiles, uniforms, standard, static lights, chunks ..)
Optional features:
- Debug rendering of the cells and the number of lights in them https://github.com/playcanvas/engine/pull/3873
- Single texture slot solution to store prefiltered data for IBL https://github.com/playcanvas/engine/issues/3681
- Extract the light evaluation fragment function to standalone chunk to allow custom lighting models (cell shading ..)
- Optimize static light culling of static meshes to avoid shadow rendering if no change
- Tighter cone / sphere insertion into the cluster cells to limit number of lights in a cell
- Allow texture atlases for shadows and cookies to use texture array (light would store viewport and additional index)
- Consider moving parts of the work to compute shaders (filling in the volume texture with lights, and also filling in the lights data textures)
Other related PRs
- globally disable shadows or cookies: https://github.com/playcanvas/engine/pull/3567
- API https://github.com/playcanvas/engine/pull/3763
Public release after rounds of beta testing: https://github.com/playcanvas/engine/pull/4586
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.