Update dependencies

This commit is contained in:
Capucho 2020-12-05 12:50:06 +00:00 committed by Avi Weinstock
parent a6e8a47ada
commit d1222daa76
15 changed files with 137 additions and 137 deletions

View File

@ -110,8 +110,3 @@ nativeBuildInputs = ["pkg-config"]
# macos CI fix isn't merged yet # macos CI fix isn't merged yet
winit = { git = "https://gitlab.com/veloren/winit.git", branch = "macos-test-spiffed" } winit = { git = "https://gitlab.com/veloren/winit.git", branch = "macos-test-spiffed" }
vek = { git = "https://gitlab.com/veloren/vek.git", branch = "fix_intrinsics2" } vek = { git = "https://gitlab.com/veloren/vek.git", branch = "fix_intrinsics2" }
# see https://github.com/rustwasm/wasm-bindgen/issues/2371
wasm-bindgen = { git = "https://github.com/rustwasm/wasm-bindgen", rev = "316c5a70fdc4a052fb65ef82bf02d52107b5671b" }
wasm-bindgen-futures = { git = "https://github.com/rustwasm/wasm-bindgen", rev = "316c5a70fdc4a052fb65ef82bf02d52107b5671b" }
web-sys = { git = "https://github.com/rustwasm/wasm-bindgen", rev = "316c5a70fdc4a052fb65ef82bf02d52107b5671b" }
js-sys = { git = "https://github.com/rustwasm/wasm-bindgen", rev = "316c5a70fdc4a052fb65ef82bf02d52107b5671b" }

View File

@ -45,7 +45,7 @@ i18n = {package = "veloren-i18n", path = "i18n"}
# Graphics # Graphics
winit = {version = "0.24.0", features = ["serde"]} winit = {version = "0.24.0", features = ["serde"]}
wgpu = { git="https://github.com/Imberflur/wgpu-rs.git" } wgpu = { git="https://github.com/gfx-rs/wgpu-rs.git", rev = "ab8b0e3766558d541206da2790dfd63f15b13bc4" }
bytemuck = { version="1.4", features=["derive"] } bytemuck = { version="1.4", features=["derive"] }
shaderc = "0.6.2" shaderc = "0.6.2"

View File

@ -82,9 +82,9 @@ impl CloudsLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 0, binding: 0,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
component_type: wgpu::TextureComponentType::Float, sample_type: wgpu::TextureSampleType::Float { filterable: true },
dimension: wgpu::TextureViewDimension::D2, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -92,17 +92,16 @@ impl CloudsLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 1, binding: 1,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler { filtering: true, comparison: false },
count: None, count: None,
}, },
// Depth source // Depth source
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 2, binding: 2,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
// TODO: is this float? sample_type: wgpu::TextureSampleType::Float { filterable: true },
component_type: wgpu::TextureComponentType::Float, view_dimension: wgpu::TextureViewDimension::D2,
dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -110,15 +109,16 @@ impl CloudsLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 3, binding: 3,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler { filtering: true, comparison: false },
count: None, count: None,
}, },
// Locals // Locals
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 4, binding: 4,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::UniformBuffer { ty: wgpu::BindingType::Buffer {
dynamic: false, ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None, min_binding_size: None,
}, },
count: None, count: None,
@ -226,7 +226,7 @@ impl CloudsPipeline {
}], }],
depth_stencil_state: None, depth_stencil_state: None,
vertex_state: wgpu::VertexStateDescriptor { vertex_state: wgpu::VertexStateDescriptor {
index_format: wgpu::IndexFormat::Uint16, index_format: None,
vertex_buffers: &[/*Vertex::desc()*/], vertex_buffers: &[/*Vertex::desc()*/],
}, },
sample_count: samples, sample_count: samples,

View File

@ -71,22 +71,6 @@ impl BoneData {
normals_mat: normals_mat.into_col_arrays(), normals_mat: normals_mat.into_col_arrays(),
} }
} }
// TODO: delete? the one below is being used
fn layout(device: &wgpu::Device) -> wgpu::BindGroupLayout {
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
label: None,
entries: &[wgpu::BindGroupLayoutEntry {
binding: 0,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::UniformBuffer {
dynamic: false,
min_binding_size: None,
},
count: None,
}],
})
}
} }
impl Default for BoneData { impl Default for BoneData {
@ -127,8 +111,9 @@ impl FigureLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 0, binding: 0,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::UniformBuffer { ty: wgpu::BindingType::Buffer {
dynamic: false, ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None, min_binding_size: None,
}, },
count: None, count: None,
@ -137,8 +122,9 @@ impl FigureLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 1, binding: 1,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::UniformBuffer { ty: wgpu::BindingType::Buffer {
dynamic: false, ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None, min_binding_size: None,
}, },
count: None, count: None,
@ -147,9 +133,9 @@ impl FigureLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 2, binding: 2,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
component_type: wgpu::TextureComponentType::Float, sample_type: wgpu::TextureSampleType::Float { filterable: true },
dimension: wgpu::TextureViewDimension::D2, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -157,7 +143,7 @@ impl FigureLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 3, binding: 3,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler { filtering: true, comparison: false },
count: None, count: None,
}, },
], ],
@ -243,7 +229,7 @@ impl FigurePipeline {
}, },
}), }),
vertex_state: wgpu::VertexStateDescriptor { vertex_state: wgpu::VertexStateDescriptor {
index_format: wgpu::IndexFormat::Uint16, index_format: None,
vertex_buffers: &[Vertex::desc()], vertex_buffers: &[Vertex::desc()],
}, },
sample_count: samples, sample_count: samples,

View File

@ -56,9 +56,9 @@ impl FluidLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 0, binding: 0,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
component_type: wgpu::TextureComponentType::Float, sample_type: wgpu::TextureSampleType::Float { filterable: true },
dimension: wgpu::TextureViewDimension::D2, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -66,7 +66,7 @@ impl FluidLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 1, binding: 1,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler { filtering: true, comparison: false },
count: None, count: None,
}, },
], ],
@ -157,7 +157,7 @@ impl FluidPipeline {
}, },
}), }),
vertex_state: wgpu::VertexStateDescriptor { vertex_state: wgpu::VertexStateDescriptor {
index_format: wgpu::IndexFormat::Uint16, index_format: None,
vertex_buffers: &[Vertex::desc()], vertex_buffers: &[Vertex::desc()],
}, },
sample_count: samples, sample_count: samples,

View File

@ -225,7 +225,7 @@ impl LodTerrainPipeline {
}, },
}), }),
vertex_state: wgpu::VertexStateDescriptor { vertex_state: wgpu::VertexStateDescriptor {
index_format: wgpu::IndexFormat::Uint16, index_format: None,
vertex_buffers: &[Vertex::desc()], vertex_buffers: &[Vertex::desc()],
}, },
sample_count: samples, sample_count: samples,

View File

@ -242,8 +242,9 @@ impl GlobalsLayouts {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 0, binding: 0,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::UniformBuffer { ty: wgpu::BindingType::Buffer {
dynamic: false, ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None, min_binding_size: None,
}, },
count: None, count: None,
@ -252,9 +253,9 @@ impl GlobalsLayouts {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 1, binding: 1,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
dimension: wgpu::TextureViewDimension::D2, sample_type: wgpu::TextureSampleType::Float { filterable: true },
component_type: wgpu::TextureComponentType::Float, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -262,15 +263,19 @@ impl GlobalsLayouts {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 2, binding: 2,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler {
filtering: true,
comparison: false,
},
count: None, count: None,
}, },
// Light uniform // Light uniform
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 3, binding: 3,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::UniformBuffer { ty: wgpu::BindingType::Buffer {
dynamic: false, ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None, min_binding_size: None,
}, },
count: None, count: None,
@ -279,8 +284,9 @@ impl GlobalsLayouts {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 4, binding: 4,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::UniformBuffer { ty: wgpu::BindingType::Buffer {
dynamic: false, ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None, min_binding_size: None,
}, },
count: None, count: None,
@ -289,9 +295,9 @@ impl GlobalsLayouts {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 5, binding: 5,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
component_type: wgpu::TextureComponentType::Uint, sample_type: wgpu::TextureSampleType::Float { filterable: true },
dimension: wgpu::TextureViewDimension::D2, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -299,16 +305,19 @@ impl GlobalsLayouts {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 6, binding: 6,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler {
filtering: true,
comparison: false,
},
count: None, count: None,
}, },
// Horizon texture // Horizon texture
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 7, binding: 7,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
component_type: wgpu::TextureComponentType::Float, sample_type: wgpu::TextureSampleType::Float { filterable: true },
dimension: wgpu::TextureViewDimension::D2, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -316,7 +325,10 @@ impl GlobalsLayouts {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 8, binding: 8,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler {
filtering: true,
comparison: false,
},
count: None, count: None,
}, },
// light shadows (ie shadows from a light?) // light shadows (ie shadows from a light?)
@ -324,8 +336,9 @@ impl GlobalsLayouts {
binding: 9, binding: 9,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
// TODO: is this relevant? // TODO: is this relevant?
ty: wgpu::BindingType::UniformBuffer { ty: wgpu::BindingType::Buffer {
dynamic: false, ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None, min_binding_size: None,
}, },
count: None, count: None,
@ -334,9 +347,9 @@ impl GlobalsLayouts {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 10, binding: 10,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
component_type: wgpu::TextureComponentType::Float, sample_type: wgpu::TextureSampleType::Float { filterable: true },
dimension: wgpu::TextureViewDimension::D2, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -344,16 +357,19 @@ impl GlobalsLayouts {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 11, binding: 11,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler {
filtering: true,
comparison: false,
},
count: None, count: None,
}, },
// directed shadow maps // directed shadow maps
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 12, binding: 12,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
component_type: wgpu::TextureComponentType::Float, sample_type: wgpu::TextureSampleType::Float { filterable: true },
dimension: wgpu::TextureViewDimension::D2, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -361,16 +377,19 @@ impl GlobalsLayouts {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 13, binding: 13,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler {
filtering: true,
comparison: false,
},
count: None, count: None,
}, },
// lod map (t_map) // lod map (t_map)
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 14, binding: 14,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
component_type: wgpu::TextureComponentType::Float, sample_type: wgpu::TextureSampleType::Float { filterable: true },
dimension: wgpu::TextureViewDimension::D2, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -378,7 +397,10 @@ impl GlobalsLayouts {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 15, binding: 15,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler {
filtering: true,
comparison: false,
},
count: None, count: None,
}, },
], ],

View File

@ -241,7 +241,7 @@ impl ParticlePipeline {
}, },
}), }),
vertex_state: wgpu::VertexStateDescriptor { vertex_state: wgpu::VertexStateDescriptor {
index_format: wgpu::IndexFormat::Uint16, index_format: None,
vertex_buffers: &[Vertex::desc(), Instance::desc()], vertex_buffers: &[Vertex::desc(), Instance::desc()],
}, },
sample_count: samples, sample_count: samples,

View File

@ -79,9 +79,9 @@ impl PostProcessLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 0, binding: 0,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
component_type: wgpu::TextureComponentType::Float, sample_type: wgpu::TextureSampleType::Float { filterable: true },
dimension: wgpu::TextureViewDimension::D2, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -89,16 +89,17 @@ impl PostProcessLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 1, binding: 1,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler { filtering: true, comparison: false },
count: None, count: None,
}, },
// src depth // src depth
// TODO: THIS IS UNUSED IN THE SHADER
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 2, binding: 2,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
component_type: wgpu::TextureComponentType::Float, sample_type: wgpu::TextureSampleType::Float { filterable: true },
dimension: wgpu::TextureViewDimension::D2, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -106,15 +107,16 @@ impl PostProcessLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 3, binding: 3,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler { filtering: true, comparison: false },
count: None, count: None,
}, },
// Locals // Locals
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 4, binding: 4,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::UniformBuffer { ty: wgpu::BindingType::Buffer {
dynamic: false, ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None, min_binding_size: None,
}, },
count: None, count: None,
@ -232,7 +234,7 @@ impl PostProcessPipeline {
}, },
}), }),
vertex_state: wgpu::VertexStateDescriptor { vertex_state: wgpu::VertexStateDescriptor {
index_format: wgpu::IndexFormat::Uint16, index_format: None,
vertex_buffers: &[/*Vertex::desc()*/], vertex_buffers: &[/*Vertex::desc()*/],
}, },
sample_count: samples, sample_count: samples,

View File

@ -28,8 +28,9 @@ impl Locals {
entries: &[wgpu::BindGroupLayoutEntry { entries: &[wgpu::BindGroupLayoutEntry {
binding: 0, binding: 0,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::UniformBuffer { ty: wgpu::BindingType::Buffer {
dynamic: false, ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None, min_binding_size: None,
}, },
count: None, count: None,
@ -169,7 +170,7 @@ impl ShadowFigurePipeline {
}, },
}), }),
vertex_state: wgpu::VertexStateDescriptor { vertex_state: wgpu::VertexStateDescriptor {
index_format: wgpu::IndexFormat::Uint16, index_format: None,
vertex_buffers: &[TerrainVertex::desc()], vertex_buffers: &[TerrainVertex::desc()],
}, },
sample_count: samples, sample_count: samples,
@ -251,7 +252,7 @@ impl ShadowPipeline {
}, },
}), }),
vertex_state: wgpu::VertexStateDescriptor { vertex_state: wgpu::VertexStateDescriptor {
index_format: wgpu::IndexFormat::Uint16, index_format: None,
vertex_buffers: &[TerrainVertex::desc()], vertex_buffers: &[TerrainVertex::desc()],
}, },
sample_count: samples, sample_count: samples,

View File

@ -90,7 +90,7 @@ impl SkyboxPipeline {
}, },
}), }),
vertex_state: wgpu::VertexStateDescriptor { vertex_state: wgpu::VertexStateDescriptor {
index_format: wgpu::IndexFormat::Uint16, index_format: None,
vertex_buffers: &[Vertex::desc()], vertex_buffers: &[Vertex::desc()],
}, },
sample_count: samples, sample_count: samples,

View File

@ -147,22 +147,6 @@ impl Locals {
offs: [offs.x, offs.y, offs.z, 0.0], offs: [offs.x, offs.y, offs.z, 0.0],
} }
} }
// TODO: unused?
fn layout(device: &wgpu::Device) -> wgpu::BindGroupLayout {
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
label: None,
entries: &[wgpu::BindGroupLayoutEntry {
binding: 0,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::UniformBuffer {
dynamic: false,
min_binding_size: None,
},
count: None,
}],
})
}
} }
pub struct SpriteLayout { pub struct SpriteLayout {
@ -179,8 +163,9 @@ impl SpriteLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 0, binding: 0,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::UniformBuffer { ty: wgpu::BindingType::Buffer {
dynamic: false, ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None, min_binding_size: None,
}, },
count: None, count: None,
@ -189,9 +174,9 @@ impl SpriteLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 1, binding: 1,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
component_type: wgpu::TextureComponentType::Float, sample_type: wgpu::TextureSampleType::Float { filterable: true },
dimension: wgpu::TextureViewDimension::D2, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -199,7 +184,10 @@ impl SpriteLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 2, binding: 2,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler {
filtering: true,
comparison: false,
},
count: None, count: None,
}, },
], ],
@ -290,7 +278,7 @@ impl SpritePipeline {
}, },
}), }),
vertex_state: wgpu::VertexStateDescriptor { vertex_state: wgpu::VertexStateDescriptor {
index_format: wgpu::IndexFormat::Uint16, index_format: None,
vertex_buffers: &[Vertex::desc(), Instance::desc()], vertex_buffers: &[Vertex::desc(), Instance::desc()],
}, },
sample_count: samples, sample_count: samples,

View File

@ -163,8 +163,9 @@ impl TerrainLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 0, binding: 0,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::UniformBuffer { ty: wgpu::BindingType::Buffer {
dynamic: false, ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None, min_binding_size: None,
}, },
count: None, count: None,
@ -173,9 +174,9 @@ impl TerrainLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 1, binding: 1,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
component_type: wgpu::TextureComponentType::Float, sample_type: wgpu::TextureSampleType::Float { filterable: true },
dimension: wgpu::TextureViewDimension::D2, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -183,7 +184,10 @@ impl TerrainLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 2, binding: 2,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler {
filtering: true,
comparison: false,
},
count: None, count: None,
}, },
], ],
@ -261,7 +265,7 @@ impl TerrainPipeline {
}, },
}), }),
vertex_state: wgpu::VertexStateDescriptor { vertex_state: wgpu::VertexStateDescriptor {
index_format: wgpu::IndexFormat::Uint16, index_format: None,
vertex_buffers: &[Vertex::desc()], vertex_buffers: &[Vertex::desc()],
}, },
sample_count: samples, sample_count: samples,

View File

@ -101,8 +101,9 @@ impl UiLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 0, binding: 0,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::UniformBuffer { ty: wgpu::BindingType::Buffer {
dynamic: false, ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None, min_binding_size: None,
}, },
count: None, count: None,
@ -116,9 +117,9 @@ impl UiLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 0, binding: 0,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture { ty: wgpu::BindingType::Texture {
component_type: wgpu::TextureComponentType::Float, sample_type: wgpu::TextureSampleType::Float { filterable: true },
dimension: wgpu::TextureViewDimension::D2, view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false, multisampled: false,
}, },
count: None, count: None,
@ -126,7 +127,10 @@ impl UiLayout {
wgpu::BindGroupLayoutEntry { wgpu::BindGroupLayoutEntry {
binding: 1, binding: 1,
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::Sampler { comparison: false }, ty: wgpu::BindingType::Sampler {
filtering: true,
comparison: false,
},
count: None, count: None,
}, },
], ],
@ -246,7 +250,7 @@ impl UiPipeline {
}, },
}), }),
vertex_state: wgpu::VertexStateDescriptor { vertex_state: wgpu::VertexStateDescriptor {
index_format: wgpu::IndexFormat::Uint16, index_format: None,
vertex_buffers: &[Vertex::desc()], vertex_buffers: &[Vertex::desc()],
}, },
sample_count: samples, sample_count: samples,

View File

@ -259,8 +259,6 @@ pub struct Renderer {
// color/depth textures // color/depth textures
locals: Locals, locals: Locals,
shader_reload_indicator: ReloadIndicator,
noise_tex: Texture, noise_tex: Texture,
mode: RenderMode, mode: RenderMode,