Properly wrap the image sampling when traceback the position. Does OpenCL provide something built in for this or can I do it faster than the ifs?