Add Filter interfaces for PoissonBlend and PoissonFill
This commit is contained in:
@@ -6,6 +6,6 @@ out vec4 o_output;
|
||||
|
||||
void main(){
|
||||
vec4 c = texture(tex0, v_texCoord0);
|
||||
o_output.rgb = vec3(step(1.0, c.a));
|
||||
o_output.rgb = vec3(step(0.01, c.a));
|
||||
o_output.a = 1.0;
|
||||
}
|
||||
@@ -41,5 +41,6 @@ void main(){
|
||||
|
||||
o_output.rgb = mix(targetColor.rgb, blend, mask*max(0.0,min(1.0, softMask * softMaskGain)));
|
||||
o_output.a = 1.0;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -12,9 +12,7 @@ out vec4 o_output;
|
||||
/** Composite the initial image and the filled image in the regions where the initial image is black. */
|
||||
void main(){
|
||||
|
||||
vec4 inputColor = textureLod(tex1, v_texCoord0, 0.0).rgba;
|
||||
//float mask = float(all(equal(inputColor, vec3(0.0))));
|
||||
//float mask = inputColor.a == 1.0? 0.0 : 1.0;
|
||||
vec4 inputColor = textureLod(tex1, v_texCoord0, 0.0);
|
||||
float mask = 1.0 - inputColor.a;
|
||||
|
||||
vec4 fillColor = textureLod(tex0, v_texCoord0, 0.0);
|
||||
|
||||
Reference in New Issue
Block a user