Update
This commit is contained in:
parent
f298038298
commit
145438d5f4
12 changed files with 243 additions and 26 deletions
12
res/shaders/font.frag
Normal file
12
res/shaders/font.frag
Normal file
|
@ -0,0 +1,12 @@
|
|||
#version 330
|
||||
|
||||
in vec4 color;
|
||||
in vec2 out_coord_texture;
|
||||
uniform sampler2D myTexture;
|
||||
|
||||
|
||||
out vec4 frag_color;
|
||||
|
||||
void main(){
|
||||
frag_color = color * texture2D(myTexture,out_coord_texture);
|
||||
}
|
15
res/shaders/font.vert
Normal file
15
res/shaders/font.vert
Normal file
|
@ -0,0 +1,15 @@
|
|||
#version 330
|
||||
layout (location = 0) in vec3 in_position;
|
||||
layout (location = 1) in vec4 in_color;
|
||||
layout (location = 2) in vec2 in_coord_texture;
|
||||
|
||||
uniform mat4 projection;
|
||||
|
||||
out vec4 color;
|
||||
out vec2 out_coord_texture;
|
||||
|
||||
void main(){
|
||||
color = in_color;
|
||||
out_coord_texture = in_coord_texture;
|
||||
gl_Position = projection * vec4(in_position,1.0f);
|
||||
}
|
Reference in a new issue