Skip to content

[codex] Improve effect handling for mesh-backed layers#10352

Closed
charlieforward9 wants to merge 2 commits into
masterfrom
codex/bitmap-layer-lighting
Closed

[codex] Improve effect handling for mesh-backed layers#10352
charlieforward9 wants to merge 2 commits into
masterfrom
codex/bitmap-layer-lighting

Conversation

@charlieforward9

@charlieforward9 charlieforward9 commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Adding extra attributes has a cost and will slow down the layer even if they are unus…#9933 (comment)

Direction

This is a draft exploration of deck.gl effect handling for globe-facing rendered surfaces.

The current patch started with BitmapLayer because it exposed the issue quickly in GlobeView: lighting and material effects need layer implementations to provide the right geometry-space inputs, normals, and shader hooks instead of assuming every renderable surface behaves like existing mesh-backed layers.

That said, I do not want to pursue a BitmapLayer/TileLayer-centered solution as the merge path. BitmapLayer is fundamentally a 2D image layer, and fixing globe lighting by special-casing bitmap tiles risks spending review energy on the least useful target.

Desired Merge Path

The useful upstream direction is to improve effect handling for layers that are already mesh/model-oriented, especially:

  • TerrainLayer
  • mesh-backed composite layers
  • model/scenegraph-style layers
  • other layers where lighting/material support is a natural part of the rendering model

The goal is to make lighting and effect behavior more predictable for globe and terrain use cases without coupling the fix to TileLayer or treating bitmap imagery as the primary lighting surface.

Current State

This draft currently contains an opt-in BitmapLayer lighting prototype:

  • adds BitmapLayer material prop support
  • wires the Phong lighting shader path into BitmapLayer when material is enabled
  • keeps existing BitmapLayer behavior by defaulting material to false
  • updates BitmapLayer docs/tests/goldens around that prototype

Treat that as a reference point for the effect plumbing problem, not as the final scope I want to merge.

Not Pursuing

I am closing the separate TileLayer/GlobeView bitmap-coordinate follow-up and do not want to carry that as a second PR. The TileLayer-specific 2D imagery path should not become the center of this work.

Validation So Far

  • BitmapLayer-focused render/test coverage was added with the prototype.
  • The separate TileLayer follow-up was validated locally, but it is being closed rather than pursued.

Progress

Keep this PR as a draft while the scope is redirected toward TerrainLayer and other mesh/model-related layers.

visgl/deck.gl#10251
visgl/deck.gl#10306
visgl/deck.gl#10350

@charlieforward9 charlieforward9 self-assigned this Jun 7, 2026
@charlieforward9 charlieforward9 marked this pull request as ready for review June 7, 2026 19:38
@coveralls

coveralls commented Jun 7, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 83.401% (+0.01%) from 83.39% — codex/bitmap-layer-lighting into master

@charlieforward9 charlieforward9 force-pushed the codex/bitmap-layer-lighting branch from 6883a19 to e16a623 Compare June 7, 2026 19:55
/**
* Material settings for lighting effect.
*
* @default true

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot better to preserve existing behavior. Modify in v10?

Suggested change
* @default true
* @default false

Copilot AI changed the title [codex] Add BitmapLayer lighting support [codex] Add opt-in BitmapLayer lighting support Jun 8, 2026
@charlieforward9 charlieforward9 changed the title [codex] Add opt-in BitmapLayer lighting support [codex] Improve effect handling for mesh-backed layers Jun 8, 2026
@charlieforward9 charlieforward9 marked this pull request as draft June 8, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants