Storing permanent data in channel shader?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/02/2009 at 16:37, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   9.6+ 
    Platform:   Windows  ; Mac  ;  Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    Hello,

    I have a channel shader and I would like it to store some custom data that is not freed over the whole rendering (means allocated in InitRender on first rendered frame and then only freed on destruction, not in FreeRender).

    This is no problem, but I would like to be able to read & write this custom data in the Output() function. Doing so somehow results in the custom data being corrupted and not containing the values I have set during Output() call.

    So my question is, is this possible at all or does the channel shader pipeline doesn´t allow permanent class members?
    Or is it only the writing of the data in the Output function making it not work (reading shouldn´t be the problem), due to maybe MP Threading of the function or whatever other reason?

    Thanks in advance for any info
    Best



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 05/02/2009 at 08:11, xxxxxxxx wrote:

    Wouldn't that be problematic anyway, for instance you have the material preview and stuff interfering. I think best way would be probably to store the data in a videopost.

    cheers,
    Matthias



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 05/02/2009 at 08:18, xxxxxxxx wrote:

    There is a quite big pipeline involved which makes sure that the custom data is only allocated when it indeed needs to be, so this shouldn´t pose a problem, but I´ll try the videopost way. This sounds much more logical.

    Thank you!


Log in to reply