Hi Merkvilson, thanks for reaching out us.
If the final intent is to simply get BaseBitmapinformation to be returned by your shader, rather than sampling a Xbitmap shader I suggest instead to simply query the color information by using BaseBitmap::GetPixel and eventually apply color space transformation.
def Output(self, sh, cd) :
x = int(cd.p.x * self.bitmap.GetBw())
y = int(cd.p.y * self.bitmap.GetBh())
col = self.bitmap.GetPixel(x, y)
return c4d.Vector(float(col[0]/256.0), float(col[1]/256.0), float(col[2]/256.0))
Best, Riccardo