Wait for Multidimentional struct

This commit is contained in:
PedroEdiaz
2024-10-18 14:01:25 -06:00
parent 7c8cfcbfce
commit 0552616bf9
7 changed files with 48 additions and 14 deletions

View File

@@ -1,8 +1,14 @@
const char * vs =
"#version 330 core\n"
"layout (location = 0) in vec3 aPos;"
"layout (location = 1) in vec3 aNormal;"
"layout (location = 0) in float aPos_x;"
"layout (location = 1) in float aPos_y;"
"layout (location = 2) in float aPos_z;"
"layout (location = 3) in float aPos_w;"
"layout (location = 4) in float aNormal_x;"
"layout (location = 5) in float aNormal_y;"
"layout (location = 6) in float aNormal_z;"
"layout (location = 7) in float aNormal_w;"
"uniform float idx;"
"uniform mat4 fix;"
@@ -16,6 +22,8 @@ const char * vs =
"void main()"
"{"
" index=idx;"
" vec3 aNormal = vec3(aNormal_x,aNormal_y,aNormal_z);"
" vec3 aPos = vec3(aPos_x,aPos_y,aPos_z);"
" Normal = mat3(transpose(inverse(rot*mdl))) * aNormal;"
" gl_Position = fix * rot * mdl * vec4( aPos, 1.0 );\n"
" FragPos = vec3( rot * mdl * vec4(aPos, 1.0));"