Alpha Channel

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

On 01/04/2007 at 14:33, xxxxxxxx wrote:

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

---------
Hi All,

how i can sample the alpha channel of a BaseChannel?
Really i don't find it 🙂

Cheers
Renato

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

On 04/04/2007 at 00:57, xxxxxxxx wrote:

You have to set the TEX_ALPHA flag. For a PluginShader it looks like this:

  
Vector BitmapData::Output(PluginShader *chn, ChannelData *cd)  
{  
     if (!shader) return 1.0;  
  
     LONG flags = cd->texflag;  
     cd->texflag |= TEX_ALPHA;  
  
     Vector res=shader->Sample(cd);  
     cd->texflag = flags;  
  
     return res;  
}  

cheers,
Matthias

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

On 04/04/2007 at 01:26, xxxxxxxx wrote:

Hi Matthias,

So, to sample the alpha channel from a basechannel i just need to set TEX_ALPHA then sample it?

I'll make some my test

Thanks for now.
Renato

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

On 04/04/2007 at 01:31, xxxxxxxx wrote:

Quote: _So, to sample the alpha channel from a basechannel i just need to set TEX_ALPHA then sample it?
>
> * * *
_


yes, exactly

cheers,
Matthias

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

On 04/04/2007 at 01:42, xxxxxxxx wrote:

Thanks 🙂
Renato