ChannelData Struct Reference

#include <c4d_shader.h>

Public Member Functions

 ChannelData ()
 
 ChannelData (BaseVolumeData *t_vd)
 
Int32 GetCurrentCPU ()
 

Public Attributes

Vector p
 
Vector n
 
Vector d
 
Float t
 
Int32 texflag
 
VolumeDatavd
 
Float off
 
Float scale
 

Constructor & Destructor Documentation

§ ChannelData() [1/2]

Default constructor.

§ ChannelData() [2/2]

ChannelData ( BaseVolumeData t_vd)
explicit

Constructs a ChannelData that matches the current state of a BaseVolumeData.

Parameters
[in]t_vdThe volume data to take p, n and d from. The caller owns the pointed volume data.

Member Function Documentation

§ GetCurrentCPU()

Int32 GetCurrentCPU ( )

Retrieves the current thread index on which the shader is executed.

Since
R16.038
Note
GetCurrentCPU() exists as a member of ChannelData and VolumeData, both yielding the same results.
However if no VolumeData is present (and only then!) a channel shader calculation can also be called with ChannelData::vd set to nullptr.
In that case (or generally) use ChannelData::GetCurrentCPU().
Returns
The running thread index, which is guaranteed to be >= 0 and smaller than the thread count that was passed during InitRender().

Member Data Documentation

§ p

Vector p

[READ ONLY] The texture position in UVW coordinates.

§ n

Vector n

[READ ONLY] The surface normal.

§ d

Vector d

[READ ONLY] The MIP sample radius in UVW coordinates.

§ t

Float t

[READ ONLY] The current time in seconds.

§ texflag

Int32 texflag

[READ ONLY] The texture flags: TEX

§ vd

[READ ONLY] The volume information, can be nullptr.

§ off

Float off

§ scale

Float scale

[READ ONLY] The MIP blur offset.