summaryrefslogtreecommitdiff
path: root/client/src/render/scene/pipelines.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-26 15:10:37 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-26 15:10:37 +0100
commit66930534a0647e2613360658a6a99eed945e2f0f (patch)
tree31a769910ef924a11206f1024b4004f74b1e396f /client/src/render/scene/pipelines.rs
parent0163f8486ceca8bd6897c1074f6846f36827d040 (diff)
downloadweareserver-66930534a0647e2613360658a6a99eed945e2f0f.tar
weareserver-66930534a0647e2613360658a6a99eed945e2f0f.tar.bz2
weareserver-66930534a0647e2613360658a6a99eed945e2f0f.tar.zst
move files around, graphics config, msaa
Diffstat (limited to 'client/src/render/scene/pipelines.rs')
-rw-r--r--client/src/render/scene/pipelines.rs12
1 files changed, 7 insertions, 5 deletions
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 <https://www.gnu.org/licenses/>.
*/
+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,
})