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
Float off
Float scale

Constructor & Destructor Documentation

Default constructor.

ChannelData ( BaseVolumeData t_vd)

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

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

Member Function Documentation

Int32 GetCurrentCPU ( )

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

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().
The running thread index, which is guaranteed to be >= 0 and smaller than the thread count that was passed during InitRender().

Member Data Documentation

Vector p

[READ ONLY] The texture position in UVW coordinates.

Vector n

[READ ONLY] The surface normal.

Vector d

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

Float t

[READ ONLY] The current time in seconds.

Int32 texflag

[READ ONLY] The texture flags: TEX

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

Float off
Float scale

[READ ONLY] The MIP blur offset.