forked from bartvdbraak/blender
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.
This commit is contained in:
parent
26f69488ca
commit
5272d76faa
@ -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)
|
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);
|
copy_v4_v4(out, src);
|
||||||
}
|
}
|
||||||
else if(fac[0]==1.0f && over[3]>=1.0f) {
|
else if(fac[0]==1.0f && over[3]>=1.0f) {
|
||||||
|
Loading…
Reference in New Issue
Block a user