File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
packages/flame_3d/shaders Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -17,17 +17,17 @@ uniform VertexInfo {
1717} vertex_info;
1818
1919void 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}
You can’t perform that action at this time.
0 commit comments