Using shape masks