diff options
Diffstat (limited to 'client/src/scene_render.rs')
-rw-r--r-- | client/src/scene_render.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/client/src/scene_render.rs b/client/src/scene_render.rs index 2100d28..3698ff7 100644 --- a/client/src/scene_render.rs +++ b/client/src/scene_render.rs @@ -38,7 +38,10 @@ pub struct ScenePipeline { impl ScenePipeline { pub fn new(device: &Device, format: TextureFormat) -> (Self, BindGroupLayout, BindGroupLayout) { - let module = device.create_shader_module(include_wgsl!("shader.wgsl")); + let fragment_pbr = device.create_shader_module(include_wgsl!("shaders/fragment_pbr.wgsl")); + let vertex_world = device.create_shader_module(include_wgsl!("shaders/vertex_world.wgsl")); + let _vertex_world_skin = + device.create_shader_module(include_wgsl!("shaders/vertex_world_skin.wgsl")); let texture_bgl = device.create_bind_group_layout(&BindGroupLayoutDescriptor { entries: &[ @@ -87,8 +90,8 @@ impl ScenePipeline { label: None, layout: Some(&pipeline_layout), fragment: Some(FragmentState { - module: &module, - entry_point: Some("fs_main"), + module: &fragment_pbr, + entry_point: Some("main"), targets: &[Some(ColorTargetState { blend: Some(BlendState::PREMULTIPLIED_ALPHA_BLENDING), format, @@ -97,8 +100,8 @@ impl ScenePipeline { compilation_options: PipelineCompilationOptions::default(), }), vertex: VertexState { - module: &module, - entry_point: Some("vs_main"), + module: &vertex_world, + entry_point: Some("main"), buffers: &[ // position VertexBufferLayout { |