deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

[Bug] Setting material: null Does Not Disable Lighting Effects

Open sychiu opened this issue 5 months ago • 0 comments

Description

I tried to visualize the location of a PointLight by creating a dot using the PointCloudLayer. Similar to the using-effects example in the docs, I set material: null so that the dot wouldn't be affected by the lighting itself.

However, I noticed that the visuals don't change when toggling the material to null. Objects are still affected by lighting. The same issue exists with extruded buildings created by the GeoJsonLayer.

This behavior does not occur in v9.0.40, but appears in v9.1. I am using Overlaid mode with Maplibre.

Flavors

  • [ ] Script tag
  • [ ] React
  • [ ] Python/Jupyter notebook
  • [x] MapboxOverlay
  • [ ] GoogleMapsOverlay
  • [ ] CARTO
  • [ ] ArcGIS

Expected Behavior

v9.0.40: with ambient light intensity 0, material property for both PointCloudLayer and GeoJsonLayer set to null. As expected, objects do not react to lighting condition, thus they are visible. Image

Same settings under v9.1: Objects are dark despite that material props are set to null. Image

Steps to Reproduce

[edit] I noticed that the official lighting example also exhibits this behavior. The example currently uses v8.9. Simply changing it to v9.0 can reproduce this bug. https://codepen.io/vis-gl/pen/ZZwrZz

On CodePen, v8.9.36 works as expected, but starting from v9.0.0, it doesn't behave as expected. It’s a bit different from my local environment.

I created a red extruded polygon on a basemap, with ambient lighting set to intensity: 0.0. You can edit the material property of the polygon on line 74. https://codepen.io/Sam7782/pen/GgJVxNb

Environment

Logs

No errors or warnings.

sychiu avatar Jul 07 '25 01:07 sychiu