Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Getting shaders channel?

    SDK Help
    0
    4
    313
    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
      Helper
      last edited by

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

      On 16/03/2004 at 23:55, xxxxxxxx wrote:

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

      ---------
      What's the correct way to determine the channel a shader is running in? All I found is a hack by Mikael, that seems to make a bit of an effort to get data which were easy to get in earlier SDK versions:

      Mikaels Code

      Is that still the "right" was doing it? Or shouldn't it be done at all anyway?

      Thanks!

      Kabe

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

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

        On 18/03/2004 at 00:50, xxxxxxxx wrote:

        Please see "Channel dependent effects" in the What's New section of the 8.503 SDK docs.

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

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

          On 18/03/2004 at 12:19, xxxxxxxx wrote:

          Well, first thanks for the pointer, I really overlooked this one!

          However, I can't get it to work. It compiles, but in...

          if (GET_TEX_CHANNEL(sd->vd->tex->texflag) == CHANNEL_LUMINANCE) {  
          

          GET_TEX_CHANNEL(sd->vd->tex->texflag) always evaluates to 0 (==CHANNEL_COLOR), no matter in which channel the shader is used...

          So, where is the pitfall here?

          Thanks!

          Kabe

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

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

            On 18/03/2004 at 21:26, xxxxxxxx wrote:

            Found the solution to this one... Don't use "==", but "&"...

            BTW: The documentation of ChannelData->texflag in the SDK is a tad short. Seems that there's only the old variant listed.

            Kabe

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