Add sprite functionality, doesn't render yet
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#version 330 core
|
||||
in vec2 texCoord;
|
||||
|
||||
out vec4 color;
|
||||
|
||||
uniform sampler2D texture;
|
||||
|
||||
void main()
|
||||
{
|
||||
color = texture(texture, texCoord);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec4 data; // (vec2)pos, (vec2)texCoord
|
||||
|
||||
out vec2 texCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(data.xy, 0.0f, 1.0f);
|
||||
texCoord = data.zw;
|
||||
}
|
||||
Reference in New Issue
Block a user