Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/09/2008 at 12:33, xxxxxxxx wrote:
User Information: Cinema 4D Version: 10.1 Platform: Windows ; Language(s) : C++ ;
--------- hello,
i added a shaderlink to my videopost plugin. now i wanted to access it from the plugin.
i tried this, but it doesnot work:
> <code> > >> `
\> LONG vp_noizer::Execute(PluginVideoPost *node, VideoPostStruct *vps, InitRenderStruct *irs) \> { \> ... \> shader = (PluginShader* )dat->GetLink(g_shader,irs->doc,Xbase); \> ... \> if (shader) \> { \> cd->p = Vector(x,y,grey); \> shaderValue = shader->Sample(cd); \> } \> ... \> b[0] = shaderValue.x; \> b[1] = shaderValue.y; \> b[2] = shaderValue.z; \> ... \> } \> \>
` > > </code>
but i get a black output.. what do i need to do to make the shader appear?
On 19/09/2008 at 06:23, xxxxxxxx wrote:
Can you be a bit more specific please, for what do you want to sample a shader?
In general you to do the following to sample a shader: -get the shader link -initialize it with InitRender() and an InitRenderStruct, it has to be created on your own if not avaible -sample the shader with a ChannelData, again you have to create it on your own if not avaible -free the shader with FreeRender()
cheers, Matthias