summaryrefslogtreecommitdiff
path: root/client/src/render/scene/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/render/scene/mod.rs')
-rw-r--r--client/src/render/scene/mod.rs16
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,
);
}