mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-27 07:26:33 +01:00
17 lines
382 B
Text
17 lines
382 B
Text
|
varying vec2 v_vTexcoord;
|
||
|
varying vec4 v_vColour;
|
||
|
|
||
|
uniform vec4 colorFrom[1024];
|
||
|
uniform float colorTo[1024];
|
||
|
uniform int colorAmount;
|
||
|
|
||
|
void main() {
|
||
|
vec4 base = texture2D( gm_BaseTexture, v_vTexcoord );
|
||
|
gl_FragColor = base;
|
||
|
|
||
|
for(int i = 0; i < colorAmount; i++) {
|
||
|
if(base == colorFrom[i])
|
||
|
gl_FragColor = vec4(colorTo[i], 0., 0., 1.);
|
||
|
}
|
||
|
}
|