Basic texturing support
This commit is contained in:
parent
8675683d10
commit
c9b454058a
3 changed files with 51 additions and 18 deletions
|
|
@ -1,7 +1,9 @@
|
|||
#version 330 core
|
||||
in vec2 frag_uv;
|
||||
out vec4 final_color;
|
||||
uniform vec4 hex_color;
|
||||
uniform sampler2D tex;
|
||||
void main()
|
||||
{
|
||||
final_color = hex_color;
|
||||
final_color = texture(tex, frag_uv) * hex_color;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@ uniform mat4 model;
|
|||
uniform mat4 view;
|
||||
uniform mat4 proj;
|
||||
|
||||
out vec2 frag_uv;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = proj * view * model * vec4(pos, 1.0f);
|
||||
frag_uv = uv;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue