diff --git a/docs/intermediate/tutorial10-lighting/README.md b/docs/intermediate/tutorial10-lighting/README.md index 352a9bb3..9de34f86 100644 --- a/docs/intermediate/tutorial10-lighting/README.md +++ b/docs/intermediate/tutorial10-lighting/README.md @@ -183,6 +183,7 @@ fn create_render_pipeline( mask: !0, alpha_to_coverage_enabled: false, }, + multiview: None, }) } ``` @@ -533,8 +534,8 @@ We're going to need to pull in the normal vector into our `shader.wgsl`. ```wgsl struct VertexInput { @location(0) position: vec3, - @location(1) tex_coords: vec2; - @location(2) normal: vec3; // NEW! + @location(1) tex_coords: vec2, + @location(2) normal: vec3, // NEW! }; ``` @@ -542,10 +543,10 @@ We're also going to want to pass that value, as well as the vertex's position to ```wgsl struct VertexOutput { - @builtin(position) clip_position: vec4; - @location(0) tex_coords: vec2; - @location(1) world_normal: vec3; - @location(2) world_position: vec3; + @builtin(position) clip_position: vec4, + @location(0) tex_coords: vec2, + @location(1) world_normal: vec3, + @location(2) world_position: vec3, }; ``` @@ -719,21 +720,21 @@ Now we need to reconstruct the normal matrix in the vertex shader. ```wgsl struct InstanceInput { - @location(5) model_matrix_0: vec4; - @location(6) model_matrix_1: vec4; - @location(7) model_matrix_2: vec4; - @location(8) model_matrix_3: vec4; + @location(5) model_matrix_0: vec4, + @location(6) model_matrix_1: vec4, + @location(7) model_matrix_2: vec4, + @location(8) model_matrix_3: vec4, // NEW! - @location(9) normal_matrix_0: vec3; - @location(10) normal_matrix_1: vec3; - @location(11) normal_matrix_2: vec3; + @location(9) normal_matrix_0: vec3, + @location(10) normal_matrix_1: vec3, + @location(11) normal_matrix_2: vec3, }; struct VertexOutput { - @builtin(position) clip_position: vec4; - @location(0) tex_coords: vec2; - @location(1) world_normal: vec3; - @location(2) world_position: vec3; + @builtin(position) clip_position: vec4, + @location(0) tex_coords: vec2, + @location(1) world_normal: vec3, + @location(2) world_position: vec3, }; @vertex diff --git a/docs/intermediate/tutorial11-normals/README.md b/docs/intermediate/tutorial11-normals/README.md index 17f7744e..c346f45f 100644 --- a/docs/intermediate/tutorial11-normals/README.md +++ b/docs/intermediate/tutorial11-normals/README.md @@ -195,12 +195,12 @@ Basically, we can use the edges of our triangles, and our normal to calculate th #[repr(C)] #[derive(Copy, Clone, Debug, bytemuck::Pod, bytemuck::Zeroable)] pub struct ModelVertex { - position: [f32; 3], - tex_coords: [f32; 2], - normal: [f32; 3], + pub position: [f32; 3], + pub tex_coords: [f32; 2], + pub normal: [f32; 3], // NEW! - tangent: [f32; 3], - bitangent: [f32; 3], + pub tangent: [f32; 3], + pub bitangent: [f32; 3], } ``` @@ -355,10 +355,10 @@ Since the normal map by default is in tangent space, we need to transform all th ```wgsl struct VertexInput { @location(0) position: vec3, - @location(1) tex_coords: vec2; - @location(2) normal: vec3; - @location(3) tangent: vec3; - @location(4) bitangent: vec3; + @location(1) tex_coords: vec2, + @location(2) normal: vec3, + @location(3) tangent: vec3, + @location(4) bitangent: vec3, }; ```