mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 22:46:19 +01:00
14 lines
289 B
Text
14 lines
289 B
Text
|
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.);
|
||
|
}
|
||
|
}
|