Neatened up transparency filtering function