render shaderlink



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

    On 01/03/2010 at 03:19, xxxxxxxx wrote:

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

    ---------
    Hi,
    I have created a shader holding multiple SHADERLINK 's. It is some kind of Layers and Alphamaps. My shader needs get colors of those SHADERLINK 's. Each SHADERLINK is holding BaseLink 's to Xbitmap shader.
    The output routine of my shader needs to render some Xbitmap 's first and combine those color to final color.
    I am holding BaseList2D* (e.g. diffuse, alpha1, ... ) for each SHADERLINK. Each of them has type=5833 means Xbitmap.
    Question: How to render Xbitmap 's I cant find any class or derivation of XBitmap.
    Vector MyShader::Output(PluginShader *chn, ChannelData *cd)
    {

    if(diffuse==NULL)
        {
          return Vector(0, 1, 0);
        }

    Vector c = ((PluginShader* )diffuse)->Sample(cd);
        float col[3];
        col[0] = c.x;
        col[1] = c.y;
        col[2] = c.z;

    return Vector(col[0], col[1], col[2]);

    }

    Final color is always black even if Xbitmap is all red.

    Greetings

    Jimbo



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

    On 01/03/2010 at 06:13, xxxxxxxx wrote:

    did you call their InitRender?



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

    On 01/03/2010 at 10:00, xxxxxxxx wrote:

    thx :D
    that's it, calling InitRender and FreeRender solved my problems :D


Log in to reply