Get info about parent material from a shader?



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

    On 09/08/2012 at 05:54, xxxxxxxx wrote:

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

    ---------
    I'm working on a special material/shader combination. The material caches some data which I then need to access from the shader. So the shader must get a material-unique ID or the material object itself to gain access to the proper data.
    Do you have any idea how to do this?



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

    On 09/08/2012 at 23:58, xxxxxxxx wrote:

    The shader can just hold a BaseLink to the material and exchange data through messages. (If the code is in a different module, otherwise direct access is possible with just a pointer to the material.)



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

    On 10/08/2012 at 12:56, xxxxxxxx wrote:

    ok that's almost what I thought of. Thanks!


Log in to reply