masks shapes : fix corner cases

fix crash with sharp corners from the beginning
limit saved conf values for borders to 0.5f