Skip to content

Fix HDR support#213

Merged
almarklein merged 2 commits into
mainfrom
hdr
Jun 16, 2026
Merged

Fix HDR support#213
almarklein merged 2 commits into
mainfrom
hdr

Conversation

@almarklein

@almarklein almarklein commented Jun 16, 2026

Copy link
Copy Markdown
Member

Fixes this wgpu example: https://github.com/pygfx/wgpu-py/blob/main/examples/offscreen_hdr.py

cc @Vipitis

  • Fix that the returned bitmap download dict had the format hardcoded to 'rgba-u8' instead of using the actual format.
  • Fix the conversion of the buffer bytes to a numpy array, for formats other than u8.
  • Performance improvement by caching the parsing of the texture format.
  • Add a test to avoid regression.

The wgpu-py example now produces a nice cube:

image

@Vipitis Vipitis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good to me!

@almarklein almarklein merged commit a8115e3 into main Jun 16, 2026
21 checks passed
@almarklein almarklein deleted the hdr branch June 16, 2026 13:51
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