Setup for test on R4
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#undef F
|
||||
#undef G
|
||||
#undef H
|
||||
|
||||
#define A -2.0,-0.05,-0.05,
|
||||
#define B -2.0,-0.05, 0.05,
|
||||
#define C -2.0, 0.05,-0.05,
|
||||
|
||||
@@ -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,12 +22,30 @@ 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));"
|
||||
"}";
|
||||
|
||||
|
||||
const char * fs_plain =
|
||||
"#version 330 core\n"
|
||||
|
||||
"uniform sampler2DArray palette;"
|
||||
|
||||
"in float index;"
|
||||
"out vec4 FragColor;"
|
||||
"in vec3 Normal;"
|
||||
"in vec3 FragPos;"
|
||||
|
||||
"void main()"
|
||||
"{"
|
||||
" FragColor = texture( palette, vec3( 0, 0, index ) ).rgba;"
|
||||
"}";
|
||||
|
||||
|
||||
|
||||
const char * fs =
|
||||
"#version 330 core\n"
|
||||
|
||||
Reference in New Issue
Block a user