Skip to content

fix(WebGPU): keep finite inputs in range on half-float uploads - #3749

Closed
PaulHax wants to merge 1 commit into
Kitware:webgpu-filterable-image-scalarsfrom
PaulHax:webgpu-finite-uint16-sampling
Closed

PaulHax wants to merge 1 commit into
Kitware:webgpu-filterable-image-scalarsfrom
PaulHax:webgpu-finite-uint16-sampling

Conversation

@PaulHax

@PaulHax PaulHax commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Superseded by #3750, with the head branch hosted in Kitware/vtk-js.

Context

Uint16 values from 65520 through 65535 round to infinity in a half-float texture. Finite floating-point inputs can also overflow. A non-finite texel can affect interpolation with its neighbors. Half-float conversion

This PR is stacked on #3748. Merge that PR first, then retarget this PR to master.

Results

With half-float storage, 65535 uploads as 65504. A partial update containing -70000 and 70000 stores -65504 and 65504 respectively.

Changes

Clamp finite values to the representable range in the half-float conversion shared by full and partial WebGPU texture uploads.

PR Checklist

  • GitHub Actions CI passed: semantic-release commit messages, lint, and tests
  • Test coverage added
  • Documentation and TypeScript definitions are current for this internal change

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.

1 participant