From 5f25423f68c31e3822d48dcbaad12be442adf5a3 Mon Sep 17 00:00:00 2001 From: Luan Nico Date: Sun, 25 Aug 2024 18:58:58 -0400 Subject: [PATCH] chore: Fix formatting of vertex shader (#3280) Fix formatting of vertex shader. --- .../flame_3d/shaders/spatial_material.vert | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/flame_3d/shaders/spatial_material.vert b/packages/flame_3d/shaders/spatial_material.vert index 535c1579a..2aecb6f08 100644 --- a/packages/flame_3d/shaders/spatial_material.vert +++ b/packages/flame_3d/shaders/spatial_material.vert @@ -17,17 +17,17 @@ uniform VertexInfo { } vertex_info; void main() { - // Calculate the modelview projection matrix - mat4 modelViewProjection = vertex_info.projection * vertex_info.view * vertex_info.model; + // Calculate the modelview projection matrix + mat4 modelViewProjection = vertex_info.projection * vertex_info.view * vertex_info.model; - // Transform the vertex position - gl_Position = modelViewProjection * vec4(vertexPosition, 1.0); + // Transform the vertex position + gl_Position = modelViewProjection * vec4(vertexPosition, 1.0); - // Pass the interpolated values to the fragment shader - fragTexCoord = vertexTexCoord; - fragColor = vertexColor; - - // Calculate the world-space position and normal - fragPosition = vec3(vertex_info.model * vec4(vertexPosition, 1.0)); - fragNormal = mat3(transpose(inverse(vertex_info.model))) * vertexNormal; + // Pass the interpolated values to the fragment shader + fragTexCoord = vertexTexCoord; + fragColor = vertexColor; + + // Calculate the world-space position and normal + fragPosition = vec3(vertex_info.model * vec4(vertexPosition, 1.0)); + fragNormal = mat3(transpose(inverse(vertex_info.model))) * vertexNormal; }