Stock
This commit is contained in:
14
shaders/bg.frag
Normal file
14
shaders/bg.frag
Normal file
@ -0,0 +1,14 @@
|
||||
# version 330 core
|
||||
|
||||
layout (location = 0) out vec4 color;
|
||||
|
||||
in DATA {
|
||||
vec2 tc;
|
||||
} fs_in;
|
||||
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main()
|
||||
{
|
||||
color = texture(tex, fs_in.tc);
|
||||
}
|
16
shaders/bg.vert
Normal file
16
shaders/bg.vert
Normal file
@ -0,0 +1,16 @@
|
||||
# version 330 core
|
||||
|
||||
layout (location = 0) in vec4 position;
|
||||
layout (location = 2) in vec2 tc;
|
||||
|
||||
uniform mat4 pr_matrix;
|
||||
|
||||
out DATA {
|
||||
vec2 tc;
|
||||
} vs_out;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = pr_matrix * position;
|
||||
vs_out.tc = tc;
|
||||
}
|
Reference in New Issue
Block a user