-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
TextureFormat::R16Uint isn't usable #3014
Comments
After debugging this further, I noticed that the image format on the reflected binding is
|
As a hacky work-around, I attempted to update fn reflect_sample_type(binding: &ReflectDescriptorBinding) -> TextureSampleType {
if binding.name.contains("height") {
TextureSampleType::Uint
} else {
TextureSampleType::Float { filterable: true }
}
}
// and set the sample_type via
BindType::Texture {
view_dimension: reflect_dimension(type_description),
sample_type: reflect_sample_type(binding),
multisampled: false,
}, This got me past the WGPU error, but then the process aborted:
@kvark I had a similar process abort when trying to use |
No idea why it aborts. Could you catch it in a debugger and see the call stack? |
Bevy version
pipelined-rendering branch: 432ce72
Operating system & version
Windows 10
What you did
Tried to use
TextureFormat::R16Uint
withutexture2D
andtexelFetch
.My preference would be to use
R16unorm
, but it doesn't currently exist. I'm attempting to useR16Uint
as a work-around and normalize it in the shader.Related:
gfx-rs/wgpu#1934
gfx-rs/wgpu#2107
What you expected to happen
The shader would source data via
texelFetch
.What actually happened
WGPU Error
Additional information
It looks like the issue is that the sample type is hard coded instead of reflected:
bevy/crates/bevy_render/src/shader/shader_reflect.rs
Lines 130 to 137 in 6a8a8c9
The text was updated successfully, but these errors were encountered: