fn description() -> PipelineDescription<'a> {
        PipelineDescription {
            vertex_layout: &[VertexFormat::Floatx2, VertexFormat::Floatx2], // Layout of 2 floats for position, 2 floats for texture coords
            pipeline_layout: Some(&[
                // Add a set of bindings
                Set(&[
                    // Our texture binding
                    Binding {
                        binding: BindingType::Texture { multisampled: false },
                        stage: ShaderStages::FRAGMENT, // We'll use this in the vertex stage
                    },
                    Binding {
                        binding: BindingType::Sampler, // A sampler for our texture
                        stage: ShaderStages::FRAGMENT, // We'll use this in the fragment stage
                    }
                    ], Some("Triangle texture bind group") // A name, not neccessary but usefull for debugging
                )
            ]),
            shader: ShaderFile::Wgsl(include_str!("./shaders/textured_square.wgsl")), // Takes in triangle shader
            name: Some("Triangle pipeline") // Name of pipeline
        }
    }
// This function is used to describe the layout of our pipeline
This function is used to describe the layout of our pipeline
This function is used to describe the layout of our pipeline
fn description() -> PipelineDescription<'a> {
        PipelineDescription {
            vertex_layout: &[VertexFormat::Floatx2, VertexFormat::Floatx2], // Layout of 2 floats for position, 2 floats for texture coords
            pipeline_layout: Some(&[
                // Add a set of bindings
                Set(&[
                    // Our texture binding
                    Binding {
                        binding: BindingType::Texture { multisampled: false },
                        stage: ShaderStages::FRAGMENT, // We'll use this in the vertex stage
                    },
                    Binding {
                        binding: BindingType::Sampler, // A sampler for our texture
                        stage: ShaderStages::FRAGMENT, // We'll use this in the fragment stage
                    }
                    ], Some("Triangle texture bind group") // A name, not neccessary but usefull for debugging
                )
            ]),
            shader: ShaderFile::Wgsl(include_str!("./shaders/textured_square.wgsl")), // Takes in triangle shader
            name: Some("Triangle pipeline") // Name of pipeline
        }
    }
fn description ( ) -> PipelineDescription < ' a > { PipelineDescription { vertex_layout : & [ VertexFormat :: Floatx2 , VertexFormat :: Floatx2 ] , // Layout of 2 floats for position, 2 floats for texture coords pipeline_layout : Some ( & [ // Add a set of bindings Set ( & [ // Our texture binding Binding { binding : BindingType :: Texture { multisampled : false } , stage : ShaderStages :: FRAGMENT , // We'll use this in the vertex stage } , Binding { binding : BindingType :: Sampler , // A sampler for our texture stage : ShaderStages :: FRAGMENT , // We'll use this in the fragment stage } ] , Some ( " " ) // A name, not neccessary but usefull for debugging ) ] ) , shader : ShaderFile :: Wgsl ( include_str ! ( " " ) ) , // Takes in triangle shader name : Some ( " " ) // Name of pipeline } }
This function is used to describe the layout of our pipeline
This function is used to describe the layout of our pipeline