Organisation

This commit is contained in:
Antoine
2021-05-17 05:39:23 +02:00
parent 5d93325b3d
commit 202c141e4d
13 changed files with 51 additions and 18 deletions

View File

@ -3,10 +3,12 @@ out vec4 FragColor;
in vec3 ourColor;
in vec2 TexCoord;
in vec4 position;
uniform sampler2D ourTexture;
uniform sampler2D texture1;
uniform sampler2D texture2;
void main()
{
FragColor = texture(ourTexture, TexCoord) * vec4(ourColor, 1.0f);
FragColor = mix(texture(texture1, TexCoord), texture(texture2, vec2(TexCoord.x, -TexCoord.y)), position.x * position.y);
}

View File

@ -5,10 +5,12 @@ layout (location = 2) in vec2 aTexCoord;
out vec3 ourColor;
out vec2 TexCoord;
out vec4 position;
void main()
{
gl_Position = vec4(aPos, 1.0);
ourColor = aColor;
TexCoord = aTexCoord;
position = gl_Position;
}