playcanvas / playcanvas/engine
Skip ambient light for standard shader
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
Hi guys,
I might be terribly missing something, but it looks like ambient light always gets added to meshes rendered with Standard Shader, even if the lightning is turned off. The suspect is https://github.com/playcanvas/engine/blob/master/src/graphics/program-lib/standard.js#L664
As standard shader is used in various instances, including UI, I believe there should be an option to skip the ambient light completely?
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.
Research direction
Start in src/graphics/program-lib/standard.js around line 664 and trace how ambient light is added to the Standard Shader. Check how the shader is used for UI and identify the existing lighting options before deciding where the opt-out belongs. Done means standard-shader meshes can explicitly skip ambient light without changing the default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100