down
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
#version 330 core
|
||||
in vec2 texcoords;
|
||||
in vec4 fcolor;
|
||||
|
||||
out vec4 color;
|
||||
|
||||
uniform sampler2D image;
|
||||
uniform vec3 spriteColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
color = vec4(spriteColor, 1.f) * texture(image, texcoords);
|
||||
color = fcolor * texture(image, texcoords);
|
||||
|
||||
if (color.a <= 0.1f)
|
||||
discard;
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
layout (location = 0) in vec2 vertex;
|
||||
layout (location = 1) in vec2 uv;
|
||||
layout (location = 2) in vec4 vColor;
|
||||
|
||||
out vec2 texcoords;
|
||||
out vec4 fcolor;
|
||||
|
||||
uniform mat4 proj;
|
||||
uniform mat4 mpv;
|
||||
|
||||
void main()
|
||||
{
|
||||
texcoords = uv;
|
||||
gl_Position = mpv * proj * vec4(vertex, 0.0, 1.0);
|
||||
fcolor = vColor;
|
||||
texcoords = uv;
|
||||
gl_Position = proj * vec4(vertex, 0.0, 1.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user