ObjectGlTex & ObjectGlTexColor now working :o)
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
#version 330 core
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec3 ourColor;
|
||||
in vec2 TexCoord;
|
||||
in vec4 color;
|
||||
in vec2 texCoord;
|
||||
|
||||
uniform sampler2D texture1;
|
||||
uniform sampler2D texture2;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = Color * mix(texture(texture1, TexCoord), texture(texture2, TexCoord), 0.5);
|
||||
FragColor = texture(texture1, vec2(texCoord.y, -texCoord.x)) * color;
|
||||
}
|
@ -2,15 +2,16 @@
|
||||
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec3 aColor;
|
||||
layout (location = 2) in vec3 aTexCoord;
|
||||
layout (location = 2) in vec2 aTexCoord;
|
||||
|
||||
out vec3 texCoord;
|
||||
out vec2 texCoord;
|
||||
out vec4 color;
|
||||
|
||||
uniform mat4 transform;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = transform * vec4(aPos, 1.0);
|
||||
Color = aColor;
|
||||
color = vec4(aColor, 1.0f);
|
||||
texCoord = aTexCoord;
|
||||
}
|
Reference in New Issue
Block a user