Skip to content

fix: Turn off lighting/material by default - #423

Merged
kylebarron merged 1 commit into
mainfrom
kyle/default-material-false
Apr 14, 2026
Merged

kylebarron merged 1 commit into
mainfrom
kyle/default-material-false

Conversation

@kylebarron

Copy link
Copy Markdown
Member

Closes #420

Thanks for the hint @rkaravia.

Before and after:

image

@kylebarron
kylebarron marked this pull request as ready for review April 14, 2026 20:12
@github-actions github-actions Bot added the fix label Apr 14, 2026
@kylebarron
kylebarron enabled auto-merge (squash) April 14, 2026 20:13
@kylebarron
kylebarron merged commit 010a4e8 into main Apr 14, 2026
3 checks passed
@kylebarron
kylebarron deleted the kyle/default-material-false branch April 14, 2026 20:14
@ds-release-bot ds-release-bot Bot mentioned this pull request Apr 14, 2026
kylebarron added a commit that referenced this pull request Sep 23, 2026
fix: Render rasters unlit, ignoring scene lighting

MeshTextureLayer's fragment shader was vendored from SimpleMeshLayer, which
runs every fragment through Phong lighting. The default material from #423
(ambient 1, diffuse 0) only cancels that out against deck.gl's default lights
(white ambient at intensity 1). Any user-supplied LightingEffect changes the
raster: an ambient intensity of 0.4 renders it at ~40% brightness, and a
LightingEffect with only directional lights renders it black.

The mesh is flat, so lighting can only ever scale the whole raster by a
constant. Drop the lighting call and write the sampled color directly, like
BitmapLayer. `material` no longer has any effect, so remove its default and
exclude it from MeshTextureLayerProps.

Closes #612

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GeoTIFF is rendered darker than expected

1 participant