Update code to use image textures
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
#version 330 core
|
||||
|
||||
in vec3 vert_color;
|
||||
in vec2 tex_coords;
|
||||
|
||||
out vec4 color;
|
||||
|
||||
uniform float mix_factor;
|
||||
uniform sampler2D texture0;
|
||||
uniform sampler2D texture1;
|
||||
|
||||
void main() {
|
||||
color = vec4(vert_color, 1.0f);
|
||||
color = mix(texture(texture0, tex_coords), texture(texture1, tex_coords), mix_factor);
|
||||
};
|
||||
|
@@ -2,10 +2,13 @@
|
||||
|
||||
layout(location=0) in vec3 position;
|
||||
layout(location=1) in vec3 color;
|
||||
layout(location=2) in vec2 uv;
|
||||
|
||||
out vec3 vert_color;
|
||||
out vec2 tex_coords;
|
||||
|
||||
void main() {
|
||||
vert_color = color;
|
||||
tex_coords = uv;
|
||||
vert_color = color;
|
||||
gl_Position = vec4(position, 1.0);
|
||||
};
|
||||
|
Reference in New Issue
Block a user