store depth up to 255 in mask