Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    render shaderlink

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 259 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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?

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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 😄
          that's it, calling InitRender and FreeRender solved my problems 😄

          1 Reply Last reply Reply Quote 0
          • First post
            Last post