Rework texture formats so shaders read every data type in the same units
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- data-visualization
Direzione di ricerca
Start with createBandTexture in packages/deck.gl-geotiff/src/multi-cog-layer.ts, inferRenderPipeline and FORMAT_TABLE in the GeoTIFF package, then follow the sampling and nodata modules. Compare the three options in the issue and trace how each data type reaches shader code. Done means one documented unit convention works for every data type, including signed integers and floats, across the affected pipelines.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
[!NOTE]
This issue was written by Claude (Claude Code), not by @kylebarron.
The units a shader reads a sample in depend on the raster's data type, and COGLayer's default pipeline renders only unsigned integers. This tracks reworking texture formats so that every data type reaches the shaders in the same units, and COGLayer can render signed integers and floats.
Today
MultiCOGLayer (createBandTexture):
uint8anduint16upload asr8unormandr16unorm, so shaders read 0-1. WithoutEXT_texture_norm16, as in Firefox,uint16goes tor32floatdivided by 65535, and stays 0-1 (#773).- Every other type uploads as
r32floatwith raw values (#777). TherenderPipelinedocs mark these types as experimental, with units "likely to change".
COGLayer's default pipeline (inferRenderPipeline) handles only unsigned integers, and throws for signed integers and floats. The format table it uses (inferScalarKind, FORMAT_TABLE):
- maps every unsigned type to a
unormformat, so shaders read 0-1. There's no 32-bitunormformat, souint32throws. - maps signed integers to integer formats such as
r16sint.CreateTexturesamples with asampler2D, which can't read integer textures. - maps floats to
r32float, with raw values. - has
uintentries, such asr8uint, that no input reaches.
The shader modules inherit the mix:
- COGLayer scales nodata into 0-1 before
FilterNoDataVal. For raw data, the same module takes the raw value. LinearRescale's docs tell Sentinel-2 users to rescale 0-0.15 for reflectance 0-10000, because ofr16unorm.- So a pipeline written for one data type gives wrong results for another, without an error.
The Zarr examples upload their own textures, as r32float with raw values.
Options
- Raw values for every data type (my pick). Shaders always read the data's own values, so nodata values, rescale ranges and filters are given in the data's units.
- Storage can stay compact.
uint8anduint16can stay inr8unormandr16unorm, with the sampling module multiplying by 255 or 65535 to get the values back. Those formats can also be linearly filtered everywhere, whichr32floatneedsfloat32-filterablefor. - Signed integers and
uint32go tor32float, as MultiCOGLayer does today. #773's fallback would upload raw floats. - Breaking: the ranges in every
uint8anduint16pipeline change, so this should land before 1.0.
- Storage can stay compact.
- Normalized integers, raw floats, as today, but complete: signed integers as
snorm(-1 to 1), or shifted into 0-1, as #180 did with a snorm-to-unorm module. Unsigned pipelines don't change, but floats and integers still differ, and the units of integer data depend on its bit width. - Keep today's rules and document them, and add signed integers and floats to COGLayer's default pipeline only.
Related: #160 (nodata precision for floats), #772 (per-band uploads in COGLayer).
🤖 Written by Claude Code
- Lingua principale
- TypeScript
- Stelle
- 240
- Fork
- 34
- Merge medio
- 17h 24m
- PR unite (30g)
- 62
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di developmentseed/deck.gl-raster
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
developmentseed/deck.gl-raster#589 ·
I maintainer di solito rispondono entro 1 giorno
-
zarr
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
developmentseed/deck.gl-raster#889 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
developmentseed/deck.gl-raster#879 ·
I maintainer di solito rispondono entro 1 giorno
-
Zooming in shows a checkerboard of placeholder tiles when overview tiles are smaller than full-resolution tilesForse già presa @kylebarron l’ha presa 16 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
developmentseed/deck.gl-raster#873 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
developmentseed/deck.gl-raster#866 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di developmentseed/deck.gl-raster
Issue simili
-
Add Alice&BotAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
slavakurilyak/awesome-ai-agents#1048 ·
-
bot:ai-assisted component:faucet github_actions security status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
midnightntwrk/midnight-faucet-api#215 ·
I maintainer di solito rispondono entro 1 giorno
-
[功能] 手机端命令执行显示 AI 动作描述Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NanmiCoder/cc-haha#2034 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
MoonshotAI/kimi-code#5539 ·
I maintainer di solito rispondono entro 1 giorno
-
mobile prio:low
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
digitalfabrik/entitlementcard#3324 ·
I maintainer di solito rispondono entro 2 giorni