correctly calculate tex coord offsets when rendering geometry