Skip to content

feat(ImageCPRMapper): add ImageCPRMapper in WebGPU#3471

Open
daker wants to merge 3 commits intoKitware:masterfrom
daker:feat-webgpu-imagecprmapper
Open

feat(ImageCPRMapper): add ImageCPRMapper in WebGPU#3471
daker wants to merge 3 commits intoKitware:masterfrom
daker:feat-webgpu-imagecprmapper

Conversation

@daker
Copy link
Copy Markdown
Collaborator

@daker daker commented Apr 4, 2026

Context

Results

Changes

  • Documentation and TypeScript definitions were updated to match those changes

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

  • This change adds or fixes unit tests
  • Tested environment:
    • vtk.js:
    • OS:
    • Browser:

daker added 2 commits April 4, 2026 16:35
WebGPU Glyph3DMapper could create a zero-byte glyphSSBO when the glyph
mapper had no instances. Dawn rejects bind groups that bind zero-sized
storage buffers, which caused runtime validation failures during
CreateBindGroup.

This change keeps the draw count at zero but allocates a single dummy
SSBO instance when numInstances === 0, initializing identity
matrix/normal data and default color when needed. That preserves
behavior while ensuring the storage buffer binding remains valid.
@daker daker force-pushed the feat-webgpu-imagecprmapper branch 2 times, most recently from 2a5297c to 94b95e5 Compare April 5, 2026 13:22
@daker daker force-pushed the feat-webgpu-imagecprmapper branch from 94b95e5 to f3714a8 Compare April 5, 2026 13:44
@daker daker marked this pull request as ready for review April 7, 2026 12:21
Copy link
Copy Markdown
Member

@finetjul finetjul left a comment

Choose a reason for hiding this comment

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

I did a quick review, looks fine generally speaking. Did not try it.

' else if (planeNum == 3u) { plane = mapperUBO.ClipPlane3; }',
' else if (planeNum == 4u) { plane = mapperUBO.ClipPlane4; }',
' else if (planeNum == 5u) { plane = mapperUBO.ClipPlane5; }',
' if (dot(plane, vec4<f32>(volumePosMC, 1.0)) < 0.0) { discard; }',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

to consolidate with other mappers.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

sure

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

i will refactor this after the clipping planes PR is merged

@daker daker mentioned this pull request Apr 8, 2026
31 tasks
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.

2 participants