Dont call mat3() constructor

This commit is contained in:
Maxime Gimeno 2019-03-15 15:38:44 +01:00
parent f39fce13e3
commit 38828181aa
1 changed files with 5 additions and 1 deletions

View File

@ -162,7 +162,11 @@ const char vertex_source_color_comp[] =
"void main(void)\n"
"{\n"
" fP = mv_matrix * vertex; \n"
" fN = mat3(mv_matrix)* normal; \n"
" mat3 mv_matrix_3; \n"
" mv_matrix_3[0] = mv_matrix[0].xyz; \n"
" mv_matrix_3[1] = mv_matrix[1].xyz; \n"
" mv_matrix_3[2] = mv_matrix[2].xyz; \n"
" fN = mv_matrix_3* normals; \n"
" fColor = vec4(color, 1.0); \n"
" gl_PointSize = point_size;\n"
" gl_Position = mvp_matrix * vertex;\n"