playcanvas / playcanvas/engine

Skip ambient light for standard shader

Open
#866 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: graphics enhancement
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

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.