diff options
author | metamuffin <metamuffin@disroot.org> | 2025-01-26 15:10:37 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-01-26 15:10:37 +0100 |
commit | 66930534a0647e2613360658a6a99eed945e2f0f (patch) | |
tree | 31a769910ef924a11206f1024b4004f74b1e396f /client/src/render/scene/mod.rs | |
parent | 0163f8486ceca8bd6897c1074f6846f36827d040 (diff) | |
download | weareserver-66930534a0647e2613360658a6a99eed945e2f0f.tar weareserver-66930534a0647e2613360658a6a99eed945e2f0f.tar.bz2 weareserver-66930534a0647e2613360658a6a99eed945e2f0f.tar.zst |
move files around, graphics config, msaa
Diffstat (limited to 'client/src/render/scene/mod.rs')
-rw-r--r-- | client/src/render/scene/mod.rs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/client/src/render/scene/mod.rs b/client/src/render/scene/mod.rs index 7471fc8..ad7e0ce 100644 --- a/client/src/render/scene/mod.rs +++ b/client/src/render/scene/mod.rs @@ -21,7 +21,8 @@ pub mod pipelines; pub mod textures; pub mod vertex_buffers; -use crate::{armature::RArmature, download::Downloader, shaders::SceneShaders}; +use super::{shaders::SceneShaders, GraphicsConfig}; +use crate::{armature::RArmature, download::Downloader}; use anyhow::Result; use bytemuck::{Pod, Zeroable}; use demand_map::DemandMap; @@ -42,11 +43,6 @@ use wgpu::{ util::{BufferInitDescriptor, DeviceExt}, }; -struct GraphicsConfig { - max_anisotropy: u16, - max_mip_count: u32, -} - pub struct ScenePreparer { device: Arc<Device>, queue: Arc<Queue>, @@ -143,13 +139,11 @@ impl ScenePreparer { queue: Arc<Queue>, render_format: TextureFormat, downloader: Arc<Downloader>, + config: GraphicsConfig, ) -> Self { Self { render_format, - config: GraphicsConfig { - max_anisotropy: 16, - max_mip_count: 16, - }, + config, layouts: SceneBgLayouts::load(&device), shaders: SceneShaders::load(&device), device, @@ -210,7 +204,7 @@ impl ScenePreparer { for spec in self.pipelines.needed() { self.pipelines.insert( spec.clone(), - Arc::new(spec.create(&self.device, &self.layouts, &self.shaders)), + Arc::new(spec.create(&self.device, &self.layouts, &self.shaders, &self.config)), 0, ); } |