mapbox / mapbox/mapbox-gl-js

`fill-extrusion-vertical-gradient` inconsistent lighting in GeoJSON sources

Open
#11,412 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

mapbox-gl-js version: 2.6.1

browser: Chrome

Steps to Trigger Behavior
  1. Add GeoJSON source as seen in the example
  2. Add fill-extrusion layer with fill-extrusion-vertical-gradient enabled
Link to Demonstration

Example: https://codesandbox.io/s/fervent-sunset-er906 (you might need to refresh the sandbox inner page to render the data)

Expected Behavior

Extrusion is rendered with equal opacity and the same color depending on the lighting.

image

Actual Behavior

Extrusion is darker in some regions, should not be shaded.

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 by reproducing the Codesandbox example with a GeoJSON source and a fill-extrusion layer using fill-extrusion-vertical-gradient. Compare the shaded regions with the expected uniform color and opacity, then trace the fill-extrusion rendering and lighting path to identify the cause. Done means the extrusion renders consistently under the reported lighting conditions without regressing other fill-extrusion behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.