Skip to content

Commit 75e64a7

Browse files
committed
chore: Fix formatting of vertex shader (#3280)
Fix formatting of vertex shader.
1 parent 3ae3ef5 commit 75e64a7

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

packages/flame_3d/shaders/spatial_material.vert

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ uniform VertexInfo {
1717
} vertex_info;
1818

1919
void main() {
20-
// Calculate the modelview projection matrix
21-
mat4 modelViewProjection = vertex_info.projection * vertex_info.view * vertex_info.model;
20+
// Calculate the modelview projection matrix
21+
mat4 modelViewProjection = vertex_info.projection * vertex_info.view * vertex_info.model;
2222

23-
// Transform the vertex position
24-
gl_Position = modelViewProjection * vec4(vertexPosition, 1.0);
23+
// Transform the vertex position
24+
gl_Position = modelViewProjection * vec4(vertexPosition, 1.0);
2525

26-
// Pass the interpolated values to the fragment shader
27-
fragTexCoord = vertexTexCoord;
28-
fragColor = vertexColor;
29-
30-
// Calculate the world-space position and normal
31-
fragPosition = vec3(vertex_info.model * vec4(vertexPosition, 1.0));
32-
fragNormal = mat3(transpose(inverse(vertex_info.model))) * vertexNormal;
26+
// Pass the interpolated values to the fragment shader
27+
fragTexCoord = vertexTexCoord;
28+
fragColor = vertexColor;
29+
30+
// Calculate the world-space position and normal
31+
fragPosition = vec3(vertex_info.model * vec4(vertexPosition, 1.0));
32+
fragNormal = mat3(transpose(inverse(vertex_info.model))) * vertexNormal;
3333
}

0 commit comments

Comments
 (0)