Check for nan results on alphafactor
Vc do treats a nan as it is instead of silently converting to
a zero. This made the mask render wrongly on certain extreme
conditions like ratio = 0.
Also removed mask to clip non values (inf, -inf, nan) as it is not
possible to know if they were supposed to be 0,1 or something else