Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CARTO: HeatmapTileLayer full colorRange #9068

Merged
merged 11 commits into from
Aug 6, 2024
Merged

Conversation

felixpalmer
Copy link
Collaborator

@felixpalmer felixpalmer commented Aug 2, 2024

Followup to #8703

Background

Screenshot 2024-08-02 at 13 59 42

Previous version only supported 6 colors in color map via explicit unifroms. With this change a colorTexture is used instead, like in the HeatmapLayer to provide an unlimited number of colors

Change List

  • Generate colorTexture from passed colorRange in Layer
  • Replace colorRange with colorTexture in shader module

@coveralls
Copy link

coveralls commented Aug 2, 2024

Coverage Status

coverage: 89.229% (-0.05%) from 89.274%
when pulling ac01efe on felix/heatmap-lut-poc
into 27c6702 on master.

Copy link
Collaborator

@ibgreen ibgreen left a comment

Choose a reason for hiding this comment

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

Very cool!

Since the very beginning of deck.gl I always wanted to create some reusable code for managing colormaps in textures that could be used across all layers.

Not quite sure if a shader module or an extension.

Since you have a working implementation here, you might see opportunities in this regard. Even starting with a partial breakdown (perhaps a shader module local to the layer) could reduce the effort to take the next step.

modules/carto/src/layers/heatmap-tile-layer.ts Outdated Show resolved Hide resolved
modules/carto/src/layers/heatmap-tile-layer.ts Outdated Show resolved Hide resolved
@felixpalmer
Copy link
Collaborator Author

reusable code for managing colormaps

Yes, that would indeed be nice and I think it would be possible via a ShaderModule. Note that this code is not new, I've lifted it from the existing HeatmapLayer. The long-term goal is to base the standard HeatmapLayer on the approach taken with HeatmapTileLayer as the performance is much better.

@felixpalmer felixpalmer merged commit 83117e0 into master Aug 6, 2024
4 checks passed
@felixpalmer felixpalmer deleted the felix/heatmap-lut-poc branch August 6, 2024 09:04
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.

4 participants