-
I want to use a texture array. I read the example, but it doesn't use wgsl. I guess I should use
My render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
entries: &[
BindGroupLayoutEntry {
binding: 0,
visibility: ShaderStages::FRAGMENT,
ty: BindingType::Texture {
multisampled: false,
sample_type: TextureSampleType::Uint,
view_dimension: TextureViewDimension::D2,
},
count: None,
},
BindGroupLayoutEntry {
binding: 1,
visibility: ShaderStages::FRAGMENT,
ty: BindingType::Texture {
multisampled: false,
sample_type: TextureSampleType::Float { filterable: true },
view_dimension: TextureViewDimension::D2,
},
count: NonZeroU32::new(5),
},
],
label: Some("tilemap_material_layout"),
}); and wgsl:
|
Beta Was this translation helpful? Give feedback.
Answered by
kvark
Apr 4, 2022
Replies: 1 comment 1 reply
-
Your texture view needs to have |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
FishHawk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your texture view needs to have
TextureViewDimension::D2Array
. The error says you are trying to useD2
instead.