playcanvas / playcanvas/engine

Force clustered lighting support into shaders even when no lights are in the scene

Open
#4,043 0 comments 1 reaction 1 assignee View on GitHub

@mvaligursky is already working on this.

Since Feb 23, 2022.

area: graphics
Dominant language
JavaScript
Stars
16.8k
Forks
2k
Avg merge
4h 32m
Merged PRs (30d)
222

Description

Forum: https://forum.playcanvas.com/t/clustered-lighting/24496

When clustered lighting is enabled, and there are no omni/spot lights in the scene, the compiled standard shaders do not contain clustered lighting chunk. When the light is later added, the shader needs to recompile.

Ideally we have a way to force include the support in the shader. Perhaps 3 options:

  • automatic (as currently .. when first light is added, recompile shaders) - likely a default option
  • always off - could be useful for low end platforms to globally disable lights in the shader
  • always on

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.