Add R8 SNORM PNG preview support #2323

Merged
ZroIsHere merged 1 commit from upstream-pr/2323 into main 2026-11-26 18:28:48 +00:00
ZroIsHere commented 2026-11-26 13:47:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ZroIsHere on 2026-11-26T13:47:08Z.


Adds PNG preview support for DXGI_FORMAT_R8_SNORM. The decoder maps the signed normalized red channel from [-1, 1] to [0, 255], and writes opaque alpha with green and blue set to zero. The texture exporter documentation now lists the format.

DXGI format reference: https://learn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format

Validation: Python AST parsing and git diff --check passed. No tests were run.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5511188920 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2323). Originally posted by [ZroIsHere](https://github.com/ZroIsHere) on 2026-11-26T13:47:08Z. --- Adds PNG preview support for DXGI_FORMAT_R8_SNORM. The decoder maps the signed normalized red channel from [-1, 1] to [0, 255], and writes opaque alpha with green and blue set to zero. The texture exporter documentation now lists the format. DXGI format reference: https://learn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format Validation: Python AST parsing and `git diff --check` passed. No tests were run.
aslan2142 commented 2026-11-26 18:29:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-26T18:29:04Z.


Merged through the integration PR #2394 (DDS preview formats batch), as head 1c78f0fee, with a merge commit, so your commits stay yours.

  • Rename from #2247: _decode_single_channel is now _decode_channels, so your R8_SNORM branch sits in that function. The code is the same.
  • Test added: a synthetic R8_SNORM test.

Thanks @ZroIsHere.

AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7200514602 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2323#issuecomment-7200514602). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-26T18:29:04Z. --- Merged through the integration PR #2394 (DDS preview formats batch), as head `1c78f0fee`, with a merge commit, so your commits stay yours. - **Rename from #2247:** `_decode_single_channel` is now `_decode_channels`, so your R8_SNORM branch sits in that function. The code is the same. - **Test added:** a synthetic R8_SNORM test. Thanks @ZroIsHere. AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2323
No description provided.