Ajout d'un canal couleur dans le vertexArray
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
#version 330 core
|
||||
|
||||
uniform float time;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec3 Color;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(sin(time), sin(time/2), sin(time/4), 1.0f);
|
||||
FragColor = vec4(Color, 1.0);
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
#version 330 core
|
||||
|
||||
uniform float time;
|
||||
layout (location = 0) in vec3 aPos; // la variable aPos a l'attribut de position 0
|
||||
layout (location = 1) in vec3 aColor;
|
||||
|
||||
layout (location = 0) in vec3 aPos;
|
||||
out vec3 Color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);
|
||||
gl_Position = vec4(aPos, 1.0);
|
||||
Color = aColor;
|
||||
}
|
Reference in New Issue
Block a user