File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ struct ModelUniforms {
1818 uModelViewMatrix: mat4x4<f32>,
1919 uNormalMatrix: mat3x3<f32>,
2020// @p5 endif
21+ uMaterialColor: vec4<f32>,
2122}
2223
2324// Group 3: Material Properties
2425struct MaterialUniforms {
25- uMaterialColor: vec4<f32>,
2626 uUseVertexColor: u32,
2727}
2828` ;
@@ -64,7 +64,7 @@ fn main(input: VertexInput) -> VertexOutput {
6464 input.aPosition,
6565 input.aNormal,
6666 input.aTexCoord,
67- select(material .uMaterialColor, input.aVertexColor, useVertexColor)
67+ select(model .uMaterialColor, input.aVertexColor, useVertexColor)
6868 );
6969
7070// @p5 ifdef Vertex getObjectInputs
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ struct ModelUniforms {
1515// @p5 ifndef StrokeVertex getWorldInputs
1616 uModelViewMatrix: mat4x4<f32>,
1717// @p5 endif
18+ uMaterialColor: vec4<f32>,
1819}
1920
2021// Group 3: Stroke Properties
2122struct StrokeUniforms {
22- uMaterialColor: vec4<f32>,
2323 uStrokeWeight: f32,
2424 uUseLineColor: f32,
2525 uSimpleLines: f32,
@@ -104,7 +104,7 @@ fn main(input: StrokeVertexInput) -> StrokeVertexOutput {
104104 if (stroke.uUseLineColor != 0.) {
105105 lineColor = input.aVertexColor;
106106 } else {
107- lineColor = stroke .uMaterialColor;
107+ lineColor = model .uMaterialColor;
108108 }
109109 var inputs = StrokeVertex(
110110 input.aPosition.xyz,
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ struct ModelUniforms {
1616 uModelViewMatrix: mat4x4<f32>,
1717 uNormalMatrix: mat3x3<f32>,
1818// @p5 endif
19+ uMaterialColor: vec4<f32>,
1920}
2021
2122// Group 3: Material Properties
2223struct MaterialUniforms {
23- uMaterialColor: vec4<f32>,
2424 uUseVertexColor: u32,
2525 uHasSetAmbient: u32,
2626 uAmbientColor: vec3<f32>,
@@ -98,7 +98,7 @@ fn main(input: VertexInput) -> VertexOutput {
9898 input.aPosition,
9999 input.aNormal,
100100 input.aTexCoord,
101- select(material .uMaterialColor, input.aVertexColor, useVertexColor)
101+ select(model .uMaterialColor, input.aVertexColor, useVertexColor)
102102 );
103103
104104// @p5 ifdef Vertex getObjectInputs
You can’t perform that action at this time.
0 commit comments