Improve rendering pipeline#5
Merged
Merged
Conversation
c97c9b2 to
7a4cec7
Compare
2e8bbab to
b4a8e9f
Compare
b4a8e9f to
c619fa7
Compare
c619fa7 to
e05e440
Compare
80b2cae to
e05e440
Compare
e05e440 to
8ad9576
Compare
8ad9576 to
3625aaf
Compare
3625aaf to
04574e8
Compare
04574e8 to
2baf498
Compare
2baf498 to
da03691
Compare
The README and shader module comments are updated to emphasize that users extending the color pipeline via `fs:HEALPIX_SELECT_VALUES` or `fs:HEALPIX_RESCALE_VALUES` must write to the `selectedValues` `inout` parameter. Writing to the global `healpixSelectedValues` variable within these hooks would result in silent overwrites. Examples in the README are also corrected to reflect this guidance.
The specs are what's important for documenting
da03691 to
53c7862
Compare
kylebarron
reviewed
May 8, 2026
Member
There was a problem hiding this comment.
ooo I like the idea of having shared components for your examples
Member
There was a problem hiding this comment.
I made developmentseed/deck.gl-raster#519 to do the same
Mobile GPUs enforce mediump int (±32767) strictly, while desktop drivers silently promote it to highp. The fragment shader's integer texture coordinate calculation (healpixCell * uTexelsPerCell) overflows mediump for datasets with more than ~32k cells, producing wrong texel lookups and corrupted colors. Fix by explicitly qualifying the critical integer variables in the shader module as highp int.
c478968 to
84e0c4a
Compare
84e0c4a to
889f0b7
Compare
[ci skip]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This replaces the old single vertex color extension with an explicit fragment pipeline built from small luma.gl shader modules. Filtering, rescaling, and coloring are separate stages with clear ordering.
The public API gains
colorMode,filterMin/filterMax,rescaleMin/rescaleMax, optionalshaderModules, and multi-texel value packing so cells can have more than four values.Two GLSL hooks were added:
HEALPIX_SELECT_VALUESandHEALPIX_RESCALE_VALUES, so callers can inject GLSL without forking the layer - useful for band math.Api Changes
The user defines how many values sit behind each HEALPix cell using
dimensions. Then through setting a colorMode the GPU knows whether the user wants:By default the layer will consider the data to have one dimension and will be rendered as a scalar with a color ramp (default to gray unless provided). If there are more than 4 dimensions the user can provide custom glsl (passed to the layer as a shader module) to select the values they want.
Whenever the color mode is set to scalar, the pipeline goes through a rescale function based on the
rescaleMin/rescaleMaxprops, but the user can provide their own custom rescaling through theHEALPIX_RESCALE_VALUEShook.flowchart LR subgraph GPU_fragment["Fragment shader — ordered stages"] V[Default selected values\n0-3] S[HEALPIX_SELECT_VALUES\ncustom selection hook] F[Filter\non scalar modes] R[Rescale\non scalar modes] H[HEALPIX_RESCALE_VALUES\ncustom rescale hook] C[Color\nLUT when scalar / RGB / RGBA] D[DECKGL_FILTER_COLOR\nnormal deckgl pipeline] end V --> S --> F --> R --> H --> C --> DDemos
A demo site is now available at https://deck.gl-healpix.ds.io/examples/sandbox/