Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why TextureFormat::R16Unorm missing? #2088

Closed
aloucks opened this issue Oct 17, 2021 · 3 comments
Closed

Why TextureFormat::R16Unorm missing? #2088

aloucks opened this issue Oct 17, 2021 · 3 comments
Labels
type: question Further information is requested

Comments

@aloucks
Copy link
Contributor

aloucks commented Oct 17, 2021

Description
TextureFormat::R16Unorm does not exist. I thought this this previously existed in WGPU.

Expected vs observed behavior
I would expect there to be a 16 bit unsigned normalized type that has a float sample type.
https://gpuweb.github.io/gpuweb/#texture-format-caps
r16unorm, float

Extra materials
I want to sample from 16bit height data. The current work around is to convert it to 8bit which loses detail (and looks awful).

Platform
wgpu 0.11.0 (via bevy pipelined-rendering branch)

@CatCode79
Copy link
Contributor

Hello @aloucks, I found this issue which I think is related:
#999

@aloucks
Copy link
Contributor Author

aloucks commented Oct 17, 2021

Although he mentions R16Unorm in the title, if you look in the details, he's actually trying to sample unsigned integer data. I'm trying to sample floating point data that's stored as an unsigned 16bit value.

I'm looking for the 16bit version of R8unorm, for higher precision.

image

@kvark
Copy link
Member

kvark commented Oct 18, 2021

The short answer is - because 16-bit normalized formats are not portable, so they were excluded from WebGPU baseline.
Both us and WebGPU upstream would welcome an optional feature to expose them.
Closing as a dupe of #1934

@kvark kvark closed this as completed Oct 18, 2021
@kvark kvark added the type: question Further information is requested label Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants