summaryrefslogtreecommitdiff
path: root/client/src/scene_render.rs
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/scene_render.rs')
-rw-r--r--client/src/scene_render.rs66
1 files changed, 2 insertions, 64 deletions
diff --git a/client/src/scene_render.rs b/client/src/scene_render.rs
index d621ba6..2720e33 100644
--- a/client/src/scene_render.rs
+++ b/client/src/scene_render.rs
@@ -19,74 +19,12 @@ use glam::{EulerRot, Mat3, Mat4};
use std::sync::Arc;
use weareshared::{packets::Resource, resources::Prefab, tree::SceneTree};
use wgpu::{
- BindGroupLayout, BindGroupLayoutDescriptor, BindGroupLayoutEntry, BindingType,
- BufferBindingType, Color, CommandEncoder, Device, IndexFormat, LoadOp, Operations,
- RenderPassColorAttachment, RenderPassDepthStencilAttachment, RenderPassDescriptor,
- SamplerBindingType, ShaderStages, StoreOp, TextureSampleType, TextureView,
- TextureViewDimension,
+ Color, CommandEncoder, IndexFormat, LoadOp, Operations, RenderPassColorAttachment,
+ RenderPassDepthStencilAttachment, RenderPassDescriptor, ShaderStages, StoreOp, TextureView,
};
pub struct ScenePipeline;
-pub struct SceneBgLayouts {
- pub texture: BindGroupLayout,
- pub material: BindGroupLayout,
- pub joints: BindGroupLayout,
-}
-impl SceneBgLayouts {
- pub fn load(device: &Device) -> Self {
- Self {
- texture: device.create_bind_group_layout(&BindGroupLayoutDescriptor {
- entries: &[
- BindGroupLayoutEntry {
- binding: 0,
- count: None,
- visibility: ShaderStages::FRAGMENT,
- ty: BindingType::Texture {
- sample_type: TextureSampleType::Float { filterable: true },
- view_dimension: TextureViewDimension::D2,
- multisampled: false,
- },
- },
- BindGroupLayoutEntry {
- binding: 1,
- count: None,
- visibility: ShaderStages::FRAGMENT,
- ty: BindingType::Sampler(SamplerBindingType::Filtering),
- },
- ],
- label: None,
- }),
- material: device.create_bind_group_layout(&BindGroupLayoutDescriptor {
- entries: &[BindGroupLayoutEntry {
- binding: 0,
- count: None,
- visibility: ShaderStages::FRAGMENT,
- ty: BindingType::Buffer {
- ty: BufferBindingType::Uniform,
- has_dynamic_offset: false,
- min_binding_size: None,
- },
- }],
- label: None,
- }),
- joints: device.create_bind_group_layout(&BindGroupLayoutDescriptor {
- entries: &[BindGroupLayoutEntry {
- binding: 0,
- count: None,
- visibility: ShaderStages::VERTEX,
- ty: BindingType::Buffer {
- ty: BufferBindingType::Uniform,
- has_dynamic_offset: false,
- min_binding_size: None,
- },
- }],
- label: None,
- }),
- }
- }
-}
-
impl ScenePipeline {
pub fn draw(
&mut self,