diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2011-12-22 03:59:57 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2011-12-22 03:59:57 +0400 |
commit | 5272d76faa969bc379ca1d1c28601c67fce98b24 (patch) | |
tree | 2634d0c5eaaf76b794748fdd9a3ce7ae511319d3 /source/blender/nodes | |
parent | 26f69488ca61e13d4c9146eba735351bb87496de (diff) |
patch [#29676] ALPHA OVER: Fix associated alpha over situation to fix [#29675] patch by Troy Sobotka
note: if alpha is negative the code will still produce non-optimal results.
This is a separate issue though, the patch fix the premul assumption that
alpha can be zero and rgb still be valid.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_alphaOver.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_alphaOver.c b/source/blender/nodes/composite/nodes/node_composite_alphaOver.c index cad85d33a66..3a783f0f32d 100644 --- a/source/blender/nodes/composite/nodes/node_composite_alphaOver.c +++ b/source/blender/nodes/composite/nodes/node_composite_alphaOver.c @@ -47,7 +47,8 @@ static bNodeSocketTemplate cmp_node_alphaover_out[]= { static void do_alphaover_premul(bNode *UNUSED(node), float *out, float *src, float *over, float *fac) { - if(over[3]<=0.0f) { + /* Zero alpha values should still permit an add of RGB data */ + if(over[3]<0.0f) { copy_v4_v4(out, src); } else if(fac[0]==1.0f && over[3]>=1.0f) { |