mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Pass format to particle pipeline
This commit is contained in:
parent
f6300a6378
commit
5f1e6b1e36
@ -174,6 +174,7 @@ impl ParticlePipeline {
|
|||||||
device: &wgpu::Device,
|
device: &wgpu::Device,
|
||||||
vs_module: &wgpu::ShaderModule,
|
vs_module: &wgpu::ShaderModule,
|
||||||
fs_module: &wgpu::ShaderModule,
|
fs_module: &wgpu::ShaderModule,
|
||||||
|
sc_desc: &wgpu::SwapChainDescriptor,
|
||||||
global_layout: &GlobalsLayouts,
|
global_layout: &GlobalsLayouts,
|
||||||
aa_mode: AaMode,
|
aa_mode: AaMode,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
@ -215,8 +216,7 @@ impl ParticlePipeline {
|
|||||||
}),
|
}),
|
||||||
primitive_topology: wgpu::PrimitiveTopology::TriangleList,
|
primitive_topology: wgpu::PrimitiveTopology::TriangleList,
|
||||||
color_states: &[wgpu::ColorStateDescriptor {
|
color_states: &[wgpu::ColorStateDescriptor {
|
||||||
// TODO pass this format in or make it a const
|
format: sc_desc.format,
|
||||||
format: wgpu::TextureFormat::Rgba8UnormSrgb,
|
|
||||||
color_blend: wgpu::BlendDescriptor {
|
color_blend: wgpu::BlendDescriptor {
|
||||||
src_factor: wgpu::BlendFactor::SrcAlpha,
|
src_factor: wgpu::BlendFactor::SrcAlpha,
|
||||||
dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha,
|
dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha,
|
||||||
|
@ -2128,6 +2128,7 @@ fn create_pipelines(
|
|||||||
device,
|
device,
|
||||||
&create_shader("particle-vert", ShaderKind::Vertex)?,
|
&create_shader("particle-vert", ShaderKind::Vertex)?,
|
||||||
&create_shader("particle-frag", ShaderKind::Fragment)?,
|
&create_shader("particle-frag", ShaderKind::Fragment)?,
|
||||||
|
sc_desc,
|
||||||
&layouts.global,
|
&layouts.global,
|
||||||
mode.aa,
|
mode.aa,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user