From 66930534a0647e2613360658a6a99eed945e2f0f Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 26 Jan 2025 15:10:37 +0100 Subject: move files around, graphics config, msaa --- client/src/render/scene/pipelines.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'client/src/render/scene/pipelines.rs') diff --git a/client/src/render/scene/pipelines.rs b/client/src/render/scene/pipelines.rs index dfc5d19..53064c9 100644 --- a/client/src/render/scene/pipelines.rs +++ b/client/src/render/scene/pipelines.rs @@ -14,6 +14,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ +use super::{GraphicsConfig, PipelineSpec}; +use crate::render::shaders::SceneShaders; use wgpu::{ BindGroupLayout, BindGroupLayoutDescriptor, BindGroupLayoutEntry, BindingType, BlendState, BufferBindingType, ColorTargetState, ColorWrites, CompareFunction, DepthBiasState, @@ -25,10 +27,6 @@ use wgpu::{ VertexStepMode, }; -use crate::shaders::SceneShaders; - -use super::PipelineSpec; - pub struct SceneBgLayouts { pub texture: BindGroupLayout, pub material: BindGroupLayout, @@ -95,6 +93,7 @@ impl PipelineSpec { device: &Device, layouts: &SceneBgLayouts, shaders: &SceneShaders, + config: &GraphicsConfig, ) -> RenderPipeline { let pipeline_layout = device.create_pipeline_layout(&PipelineLayoutDescriptor { label: None, @@ -188,7 +187,10 @@ impl PipelineSpec { bias: DepthBiasState::default(), stencil: StencilState::default(), }), - multisample: MultisampleState::default(), + multisample: MultisampleState { + count: config.sample_count, + ..Default::default() + }, multiview: None, cache: None, }) -- cgit v1.2.3-70-g09d2