mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-27 07:26:33 +01:00
13 lines
289 B
GLSL
13 lines
289 B
GLSL
varying vec2 v_vTexcoord;
|
|
varying vec4 v_vColour;
|
|
|
|
void main() {
|
|
vec4 col = texture2D( gm_BaseTexture, v_vTexcoord );
|
|
|
|
if(col.r + col.g == 0.) {
|
|
gl_FragColor = vec4(0., 0., 0., 1.);
|
|
} else {
|
|
float whi = (col.g) / (col.r + col.g);
|
|
gl_FragColor = vec4(whi, whi, whi, 1.);
|
|
}
|
|
}
|