mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-15 06:53:59 +01:00
14 lines
289 B
GLSL
14 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.);
|
|
}
|
|
}
|