Compute on float instead of unsigned char