OK, this whole code works pretty well with almost all channel shaders available in CINEMA 4D, and also with 3rd party channel shaders.

The problem is, it does not always work with bitmap textures. A bitmap texture (BMP, JPEG, TIFF, etc) is also represented by a PluginShader, so I can evaluate it.
If the user uses a material with a texture in the color channel, it gives me correct results. But when the user saves his scene and loads it again later, the Sample() function always returns a zero vector. This can just be pr evented by keeping the used texture in a directory that is one of the Texture Path (set up in the CINEMA 4D preferences).

Question(s) :

How can I make this work, even when the texture is not in one of the standard texture paths?
Do I have to call some kind of PleaseRememberYourTexture() method in the PluginShader?