mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-15 06:53:59 +01:00
17 lines
336 B
Plaintext
17 lines
336 B
Plaintext
|
varying vec2 v_vTexcoord;
|
||
|
varying vec4 v_vColour;
|
||
|
|
||
|
uniform sampler2D bg, fg;
|
||
|
|
||
|
void main() {
|
||
|
vec4 _bc = texture2D(bg, v_vTexcoord);
|
||
|
vec4 _fc = texture2D(fg, v_vTexcoord);
|
||
|
|
||
|
// gl_FragColor = _fc; return;
|
||
|
|
||
|
gl_FragColor = _bc;
|
||
|
if(_fc.a == 0.) return;
|
||
|
|
||
|
gl_FragColor = _bc.a == 0.? v_vColour : vec4(0.);
|
||
|
}
|