Repository navigation
Conversation
linearlinear
willjnz
force-pushed
the
sampler-multicoglayer
branch
from
August 25, 2026 01:20
f91b177 to
948dc7b
Compare
Contributor
|
+1, we need this for |
2 tasks done
4 tasks done
kylebarron
added a commit
that referenced
this pull request
Oct 22, 2026
MultiCOGLayer creates its band textures itself, with a hardcoded linear sampler, and offers no way to change it. Linear filtering defeats an exact-match nodata filter: pixels next to nodata blend with the nodata value, no longer match it, and draw as a rim. `resampling: "linear" | "nearest"` (default "linear") picks the filter. It is applied when each tile is rendered, not when its textures are created, so changing it updates tiles that are already loaded without fetching them again. Based on #640 by @willjnz. Co-Authored-By: Claude Opus 5.5 <[email protected]>
kylebarron
added a commit
that referenced
this pull request
Oct 22, 2026
MultiCOGLayer creates its band textures itself, with a hardcoded linear sampler, and offers no way to change it. Linear filtering defeats an exact-match nodata filter: pixels next to nodata blend with the nodata value, no longer match it, and draw as a rim. `resampling: "linear" | "nearest"` (default "linear") picks the filter. It is applied when each tile is rendered, not when its textures are created, so changing it updates tiles that are already loaded without fetching them again. Based on #640 by @willjnz. Co-Authored-By: Claude Opus 5.5 <[email protected]>
kylebarron
added a commit
that referenced
this pull request
Oct 22, 2026
MultiCOGLayer creates its band textures itself, with a hardcoded linear sampler, and offers no way to change it. Linear filtering defeats an exact-match nodata filter: pixels next to nodata blend with the nodata value, no longer match it, and draw as a rim. `resampling: "linear" | "nearest"` (default "linear") picks the filter. It is applied when each tile is rendered, not when its textures are created, so changing it updates tiles that are already loaded without fetching them again. Based on #640 by @willjnz. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-authored-by: William Jones <[email protected]>
kylebarron
added a commit
that referenced
this pull request
Oct 22, 2026
> [!NOTE] > This PR was written by Claude (Claude Code), not by @kylebarron. `MultiCOGLayer` creates its band textures itself and always filters them linearly, with no way to change it. This adds `resampling?: "linear" | "nearest"`, defaulting to `"linear"` (today's behavior). Nearest shows the data's own pixels. It also matters with an exact-match nodata filter such as `FilterNoDataVal`: linear filtering blends the nodata value into the pixels next to it, so they no longer match it and draw as a rim around nodata areas. The filter is applied each time a tile is rendered, not only when its textures are created. luma.gl stores the filter on each texture, and `renderTile` runs for every loaded tile whenever the layer's props change, so switching `resampling` updates loaded tiles without fetching them again. A band whose format the device can't filter, such as a 16-bit band stored as `r32float` on a device without `float32-filterable` (#773), stays nearest either way. The Sentinel-2 example gets a Resampling selector. This replaces #640's `bandSampler: SamplerProps` with a smaller API. Thanks to @willjnz for the original PR, and to @earlybard for the nodata case. Closes #640 Ref #215 🤖 Written by [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: William Jones <[email protected]>
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.
Related to #215 (comment). My data is UInt16 surface reflectance with nodata=0.
Can be simply used like