mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix wrong intermediate target texture format
This commit is contained in:
parent
8669788682
commit
584c152dd3
@ -145,7 +145,6 @@ impl CloudsPipeline {
|
||||
vs_module: &wgpu::ShaderModule,
|
||||
fs_module: &wgpu::ShaderModule,
|
||||
global_layout: &GlobalsLayouts,
|
||||
sc_desc: &wgpu::SwapChainDescriptor,
|
||||
layout: &CloudsLayout,
|
||||
aa_mode: AaMode,
|
||||
) -> Self {
|
||||
@ -196,7 +195,7 @@ impl CloudsPipeline {
|
||||
module: fs_module,
|
||||
entry_point: "main",
|
||||
targets: &[wgpu::ColorTargetState {
|
||||
format: sc_desc.format,
|
||||
format: wgpu::TextureFormat::Rgba16Float,
|
||||
blend: None,
|
||||
write_mask: wgpu::ColorWrite::ALL,
|
||||
}],
|
||||
|
@ -173,7 +173,6 @@ impl FigurePipeline {
|
||||
device: &wgpu::Device,
|
||||
vs_module: &wgpu::ShaderModule,
|
||||
fs_module: &wgpu::ShaderModule,
|
||||
sc_desc: &wgpu::SwapChainDescriptor,
|
||||
global_layout: &GlobalsLayouts,
|
||||
layout: &FigureLayout,
|
||||
aa_mode: AaMode,
|
||||
@ -241,7 +240,7 @@ impl FigurePipeline {
|
||||
module: fs_module,
|
||||
entry_point: "main",
|
||||
targets: &[wgpu::ColorTargetState {
|
||||
format: sc_desc.format,
|
||||
format: wgpu::TextureFormat::Rgba16Float,
|
||||
blend: None,
|
||||
write_mask: wgpu::ColorWrite::ALL,
|
||||
}],
|
||||
|
@ -115,7 +115,6 @@ impl FluidPipeline {
|
||||
device: &wgpu::Device,
|
||||
vs_module: &wgpu::ShaderModule,
|
||||
fs_module: &wgpu::ShaderModule,
|
||||
sc_desc: &wgpu::SwapChainDescriptor,
|
||||
global_layout: &GlobalsLayouts,
|
||||
layout: &FluidLayout,
|
||||
terrain_layout: &TerrainLayout,
|
||||
@ -184,7 +183,7 @@ impl FluidPipeline {
|
||||
module: fs_module,
|
||||
entry_point: "main",
|
||||
targets: &[wgpu::ColorTargetState {
|
||||
format: sc_desc.format,
|
||||
format: wgpu::TextureFormat::Rgba16Float,
|
||||
blend: Some(wgpu::BlendState {
|
||||
color: wgpu::BlendComponent {
|
||||
src_factor: wgpu::BlendFactor::SrcAlpha,
|
||||
|
@ -152,7 +152,6 @@ impl LodTerrainPipeline {
|
||||
device: &wgpu::Device,
|
||||
vs_module: &wgpu::ShaderModule,
|
||||
fs_module: &wgpu::ShaderModule,
|
||||
sc_desc: &wgpu::SwapChainDescriptor,
|
||||
global_layout: &GlobalsLayouts,
|
||||
aa_mode: AaMode,
|
||||
) -> Self {
|
||||
@ -213,7 +212,7 @@ impl LodTerrainPipeline {
|
||||
module: fs_module,
|
||||
entry_point: "main",
|
||||
targets: &[wgpu::ColorTargetState {
|
||||
format: sc_desc.format,
|
||||
format: wgpu::TextureFormat::Rgba16Float,
|
||||
blend: None,
|
||||
write_mask: wgpu::ColorWrite::ALL,
|
||||
}],
|
||||
|
@ -175,7 +175,6 @@ impl ParticlePipeline {
|
||||
device: &wgpu::Device,
|
||||
vs_module: &wgpu::ShaderModule,
|
||||
fs_module: &wgpu::ShaderModule,
|
||||
sc_desc: &wgpu::SwapChainDescriptor,
|
||||
global_layout: &GlobalsLayouts,
|
||||
aa_mode: AaMode,
|
||||
) -> Self {
|
||||
@ -237,7 +236,8 @@ impl ParticlePipeline {
|
||||
module: fs_module,
|
||||
entry_point: "main",
|
||||
targets: &[wgpu::ColorTargetState {
|
||||
format: sc_desc.format,
|
||||
// TODO: use a constant and/or pass in this format on pipeline construction
|
||||
format: wgpu::TextureFormat::Rgba16Float,
|
||||
blend: Some(wgpu::BlendState {
|
||||
color: wgpu::BlendComponent {
|
||||
src_factor: wgpu::BlendFactor::SrcAlpha,
|
||||
|
@ -27,6 +27,7 @@ impl VertexTrait for Vertex {
|
||||
const STRIDE: wgpu::BufferAddress = mem::size_of::<Self>() as wgpu::BufferAddress;
|
||||
}
|
||||
|
||||
// TODO: does skybox still do anything with new cloud shaders?
|
||||
pub struct SkyboxPipeline {
|
||||
pub pipeline: wgpu::RenderPipeline,
|
||||
}
|
||||
@ -36,7 +37,6 @@ impl SkyboxPipeline {
|
||||
device: &wgpu::Device,
|
||||
vs_module: &wgpu::ShaderModule,
|
||||
fs_module: &wgpu::ShaderModule,
|
||||
sc_desc: &wgpu::SwapChainDescriptor,
|
||||
layouts: &GlobalsLayouts,
|
||||
aa_mode: AaMode,
|
||||
) -> Self {
|
||||
@ -98,7 +98,7 @@ impl SkyboxPipeline {
|
||||
module: fs_module,
|
||||
entry_point: "main",
|
||||
targets: &[wgpu::ColorTargetState {
|
||||
format: sc_desc.format,
|
||||
format: wgpu::TextureFormat::Rgba16Float,
|
||||
blend: None,
|
||||
write_mask: wgpu::ColorWrite::ALL,
|
||||
}],
|
||||
|
@ -406,7 +406,6 @@ impl SpritePipeline {
|
||||
device: &wgpu::Device,
|
||||
vs_module: &wgpu::ShaderModule,
|
||||
fs_module: &wgpu::ShaderModule,
|
||||
sc_desc: &wgpu::SwapChainDescriptor,
|
||||
global_layout: &GlobalsLayouts,
|
||||
layout: &SpriteLayout,
|
||||
terrain_layout: &TerrainLayout,
|
||||
@ -477,7 +476,7 @@ impl SpritePipeline {
|
||||
module: fs_module,
|
||||
entry_point: "main",
|
||||
targets: &[wgpu::ColorTargetState {
|
||||
format: sc_desc.format,
|
||||
format: wgpu::TextureFormat::Rgba16Float,
|
||||
// TODO: can we remove sprite transparency?
|
||||
blend: Some(wgpu::BlendState {
|
||||
color: wgpu::BlendComponent {
|
||||
|
@ -210,7 +210,6 @@ impl TerrainPipeline {
|
||||
device: &wgpu::Device,
|
||||
vs_module: &wgpu::ShaderModule,
|
||||
fs_module: &wgpu::ShaderModule,
|
||||
sc_desc: &wgpu::SwapChainDescriptor,
|
||||
global_layout: &GlobalsLayouts,
|
||||
layout: &TerrainLayout,
|
||||
aa_mode: AaMode,
|
||||
@ -278,7 +277,7 @@ impl TerrainPipeline {
|
||||
module: fs_module,
|
||||
entry_point: "main",
|
||||
targets: &[wgpu::ColorTargetState {
|
||||
format: sc_desc.format,
|
||||
format: wgpu::TextureFormat::Rgba16Float,
|
||||
blend: None,
|
||||
write_mask: wgpu::ColorWrite::ALL,
|
||||
}],
|
||||
|
@ -549,13 +549,13 @@ impl Renderer {
|
||||
mip_level_count: levels,
|
||||
sample_count,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
format: wgpu::TextureFormat::Bgra8UnormSrgb,
|
||||
format: wgpu::TextureFormat::Rgba16Float,
|
||||
usage: wgpu::TextureUsage::SAMPLED | wgpu::TextureUsage::RENDER_ATTACHMENT,
|
||||
});
|
||||
|
||||
tex.create_view(&wgpu::TextureViewDescriptor {
|
||||
label: None,
|
||||
format: Some(wgpu::TextureFormat::Bgra8UnormSrgb),
|
||||
format: Some(wgpu::TextureFormat::Rgba16Float),
|
||||
dimension: Some(wgpu::TextureViewDimension::D2),
|
||||
// TODO: why is this not Color?
|
||||
aspect: wgpu::TextureAspect::All,
|
||||
@ -2062,7 +2062,6 @@ fn create_pipelines(
|
||||
device,
|
||||
&create_shader("skybox-vert", ShaderKind::Vertex)?,
|
||||
&create_shader("skybox-frag", ShaderKind::Fragment)?,
|
||||
sc_desc,
|
||||
&layouts.global,
|
||||
mode.aa,
|
||||
);
|
||||
@ -2072,7 +2071,6 @@ fn create_pipelines(
|
||||
device,
|
||||
&figure_vert_mod,
|
||||
&create_shader("figure-frag", ShaderKind::Fragment)?,
|
||||
sc_desc,
|
||||
&layouts.global,
|
||||
&layouts.figure,
|
||||
mode.aa,
|
||||
@ -2084,7 +2082,6 @@ fn create_pipelines(
|
||||
device,
|
||||
&terrain_vert,
|
||||
&create_shader("terrain-frag", ShaderKind::Fragment)?,
|
||||
sc_desc,
|
||||
&layouts.global,
|
||||
&layouts.terrain,
|
||||
mode.aa,
|
||||
@ -2100,7 +2097,6 @@ fn create_pipelines(
|
||||
device,
|
||||
&create_shader("fluid-vert", ShaderKind::Vertex)?,
|
||||
&create_shader(&selected_fluid_shader, ShaderKind::Fragment)?,
|
||||
sc_desc,
|
||||
&layouts.global,
|
||||
&layouts.fluid,
|
||||
&layouts.terrain,
|
||||
@ -2112,7 +2108,6 @@ fn create_pipelines(
|
||||
device,
|
||||
&create_shader("sprite-vert", ShaderKind::Vertex)?,
|
||||
&create_shader("sprite-frag", ShaderKind::Fragment)?,
|
||||
sc_desc,
|
||||
&layouts.global,
|
||||
&layouts.sprite,
|
||||
&layouts.terrain,
|
||||
@ -2124,7 +2119,6 @@ fn create_pipelines(
|
||||
device,
|
||||
&create_shader("particle-vert", ShaderKind::Vertex)?,
|
||||
&create_shader("particle-frag", ShaderKind::Fragment)?,
|
||||
sc_desc,
|
||||
&layouts.global,
|
||||
mode.aa,
|
||||
);
|
||||
@ -2144,7 +2138,6 @@ fn create_pipelines(
|
||||
device,
|
||||
&create_shader("lod-terrain-vert", ShaderKind::Vertex)?,
|
||||
&create_shader("lod-terrain-frag", ShaderKind::Fragment)?,
|
||||
sc_desc,
|
||||
&layouts.global,
|
||||
mode.aa,
|
||||
);
|
||||
@ -2156,7 +2149,6 @@ fn create_pipelines(
|
||||
&create_shader("clouds-frag", ShaderKind::Fragment)?,
|
||||
// TODO: pass in format of intermediate color buffer
|
||||
&layouts.global,
|
||||
sc_desc,
|
||||
&layouts.clouds,
|
||||
mode.aa,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user