Improved texel offset calculation in packing shader