Hi,
I've implemented a material shader similar to vray_MtlDiffuse in the sdk directory and I wanted the newly created shader to support render elements.
In shade(), I did something like this:
I've noticed that renderChannelIndex_color is from a plugin parameter:
Then I have the following questions:
1. How do I set the plugin parameter to my shader such that I can get a correct index for the method setChannelData?
2. If I want to make my material support the existing render channels, what is the correct way of doing that?
3. If I create a new render channel plugin, how do I make it support the built-in/custom material shaders?
Thanks!
Best regards,
Gene
I've implemented a material shader similar to vray_MtlDiffuse in the sdk directory and I wanted the newly created shader to support render elements.
In shade(), I did something like this:
Code:
VR::Fragment *f=rc.mtlresult.fragment; if (f) { f->setChannelData(renderChannelIndex_color, &rc.mtlresult.color); }
Code:
paramList->setParamCache("render_channel_color", &renderChannelPlugin_color);
1. How do I set the plugin parameter to my shader such that I can get a correct index for the method setChannelData?
2. If I want to make my material support the existing render channels, what is the correct way of doing that?
3. If I create a new render channel plugin, how do I make it support the built-in/custom material shaders?
Thanks!
Best regards,
Gene
Comment