Skip to content

fix(deck.gl-raster): initialize color in the MeshTextureLayer fragment shader - #729

Merged
kylebarron merged 1 commit into
mainfrom
kyle/mesh-layer-init-color
Oct 16, 2026
Merged

kylebarron merged 1 commit into
mainfrom
kyle/mesh-layer-init-color

Conversation

@kylebarron

Copy link
Copy Markdown
Member

Note

This PR was written by Claude (Claude Code), not by @kylebarron.

MeshTextureLayer's fragment shader declared vec4 color; and passed it to DECKGL_FILTER_COLOR without a value, under a comment saying it was initialized. Reading an uninitialized variable is undefined in GLSL, so a pipeline with no modules, or one whose first module reads color before writing it, got whatever the driver left there. The shader now starts from transparent, vec4 color = vec4(0.0);.

The built-in pipelines overwrite color in their first module, so their output doesn't change: the nldas-icechunk example renders pixel-identical screenshots in Chrome before and after, with no shader errors.

Closes #691

🤖 Written by Claude Code

…t shader

The fragment shader declared `vec4 color;` and passed it to
`DECKGL_FILTER_COLOR` without a value. Reading an uninitialized variable
is undefined in GLSL, so a pipeline with no modules, or one whose first
module reads `color`, got whatever the driver left there. Start from
transparent instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the fix label Oct 16, 2026

@kylebarron kylebarron left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

lgtm

@kylebarron
kylebarron merged commit 117864b into main Oct 16, 2026
3 checks passed
@kylebarron
kylebarron deleted the kyle/mesh-layer-init-color branch October 16, 2026 18:41
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.

MeshTextureLayer passes an uninitialized color to DECKGL_FILTER_COLOR

1 participant