Implement SubRect test in oculus example