Add Filter interfaces for PoissonBlend and PoissonFill

This commit is contained in:
Edwin Jakobs
2020-02-27 16:45:50 +01:00
parent 96bd90e6b9
commit 9cb7ac6644
5 changed files with 68 additions and 10 deletions

View File

@@ -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;
}

View File

@@ -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;
}
}

View File

@@ -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);