mirror of
				https://github.com/flame-engine/flame.git
				synced 2025-11-04 04:47:13 +08:00 
			
		
		
		
	chore: Fix formatting of vertex shader (#3280)
Fix formatting of vertex shader.
This commit is contained in:
		@ -17,17 +17,17 @@ uniform VertexInfo {
 | 
				
			|||||||
} vertex_info;
 | 
					} vertex_info;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void main() {
 | 
					void main() {
 | 
				
			||||||
    // Calculate the modelview projection matrix
 | 
					  // Calculate the modelview projection matrix
 | 
				
			||||||
    mat4 modelViewProjection = vertex_info.projection * vertex_info.view * vertex_info.model;
 | 
					  mat4 modelViewProjection = vertex_info.projection * vertex_info.view * vertex_info.model;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Transform the vertex position
 | 
					  // Transform the vertex position
 | 
				
			||||||
    gl_Position = modelViewProjection * vec4(vertexPosition, 1.0);
 | 
					  gl_Position = modelViewProjection * vec4(vertexPosition, 1.0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Pass the interpolated values to the fragment shader
 | 
					  // Pass the interpolated values to the fragment shader
 | 
				
			||||||
    fragTexCoord = vertexTexCoord;
 | 
					  fragTexCoord = vertexTexCoord;
 | 
				
			||||||
    fragColor = vertexColor;
 | 
					  fragColor = vertexColor;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Calculate the world-space position and normal
 | 
					  // Calculate the world-space position and normal
 | 
				
			||||||
    fragPosition = vec3(vertex_info.model * vec4(vertexPosition, 1.0));
 | 
					  fragPosition = vec3(vertex_info.model * vec4(vertexPosition, 1.0));
 | 
				
			||||||
    fragNormal = mat3(transpose(inverse(vertex_info.model))) * vertexNormal;
 | 
					  fragNormal = mat3(transpose(inverse(vertex_info.model))) * vertexNormal;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user