mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
17 lines
239 B
GLSL
17 lines
239 B
GLSL
#version 330 core
|
|
|
|
in vec2 texCoords;
|
|
|
|
flat in int id;
|
|
|
|
out vec4 FragColor;
|
|
|
|
uniform sampler2D tex;
|
|
uniform vec4 color[100];
|
|
|
|
void main(){
|
|
float alpha=texture(tex,texCoords).x;
|
|
vec4 c=color[id];
|
|
FragColor=vec4(c.x,c.y,c.z,c.w*alpha);
|
|
}
|