mmtalaie
3 years ago
commit
269005926e
6 changed files with 51 additions and 0 deletions
@ -0,0 +1,6 @@ |
|||||
|
#version 330 core |
||||
|
in vec4 color; |
||||
|
out vec4 FragColor; |
||||
|
void main() { |
||||
|
FragColor = color; |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
#version 330 core |
||||
|
layout (location = 0) in vec4 vertices; |
||||
|
uniform vec4 ourColor; |
||||
|
out vec4 color; |
||||
|
void main() |
||||
|
{ |
||||
|
color = ourColor; |
||||
|
gl_Position = vertices; |
||||
|
} |
@ -0,0 +1,7 @@ |
|||||
|
#version 330 core |
||||
|
in vec4 color; |
||||
|
out vec4 FragColor; |
||||
|
void main() { |
||||
|
// FragColor = vec4(1.,1.,0., 1.0); |
||||
|
FragColor = color; |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
#version 330 core |
||||
|
layout (location = 0) in vec4 vertices; |
||||
|
uniform vec4 ourColor; |
||||
|
out vec4 color; |
||||
|
void main() |
||||
|
{ |
||||
|
color = ourColor; |
||||
|
gl_Position = vertices; |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
#version 330 core |
||||
|
in vec2 TexCoords; |
||||
|
out vec4 FragColor; |
||||
|
uniform sampler2D text; |
||||
|
uniform vec3 textColor; |
||||
|
void main() |
||||
|
{ |
||||
|
vec4 sampled = vec4(1.0, 1.0, 1.0, texture(text, TexCoords).r); |
||||
|
FragColor = vec4(textColor, 1.00) * sampled; |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
#version 330 core |
||||
|
layout (location = 4) in vec4 vertex; |
||||
|
out vec2 TexCoords; |
||||
|
uniform mat4 projection; |
||||
|
void main() |
||||
|
{ |
||||
|
gl_Position = projection * vec4(vertex.xy, 0.0, 1.0); |
||||
|
TexCoords.x = vertex.z; |
||||
|
TexCoords.y = vertex.w; |
||||
|
} |
Loading…
Reference in new issue