#include <c4d_shader.h>
Public Attributes |
|
Int32 | version |
Int32 | fps |
向量 | ambient |
Float | time |
向量 | col |
向量 | trans |
向量 | refl |
Float | alpha |
Ray * | tray |
Ray * | rray |
Vector64 | p |
Vector64 | bumpn |
Ray * | ray |
Vector64 | orign |
Vector64 | n |
Vector64 | dispn |
Float64 | dist |
Float64 | cosc |
向量 | uvw |
向量 | delta |
RayHitID | lhit |
const TexData * | tex |
向量 | ddu |
向量 | ddv |
Int32 | raydepth |
Int32 | calc_trans |
Int32 | calc_refl |
Bool | calc_shadow |
Int32 | calc_illum |
Int32 | calc_mip |
向量 | pp [3] |
向量 | nn [3] |
RAYBIT | raybits |
const RayLight * | xlight |
const RayObject * | op |
Int32 | recursion_id |
void * | recursion_data |
Multipass * | multipass |
向量 | back_p |
向量 | back_delta |
Float | global_mip |
Int32 | sid |
Float | par_u |
Float | par_v |
SurfaceIntersection * | intersection |
Float | mb_offset |
向量 | comp_color |
向量 | comp_specular |
向量 | comp_luminance |
TexEntry * | rtex [4] |
Int32 | rtex_count |
Int32 | elementIndex |
const RayPolyWeight * | displacementWeight |
Protected Member Functions |
|
BaseVolumeData () |
|
protected |
Int32 version |
[READ ONLY] The version number of the structure.
Int32 fps |
[READ ONLY] The frames per second.
向量 ambient |
[READ ONLY] The global ambient component.
Float time |
[READ ONLY] The current time in seconds.
向量 col |
[READ WRITE] Set the calculated color within MaterialData::CalcSurface() and MaterialData::CalcVolumetric() .
向量 trans |
[READ WRITE] Set the calculated transparency within MaterialData::CalcSurface() , MaterialData::CalcTransparency() and MaterialData::CalcVolumetric() .
向量 refl |
[READ WRITE] Set the calculated reflection within MaterialData::CalcSurface() .
Float alpha |
[READ WRITE] Set the calculated alpha within MaterialData::CalcAlpha() .
Ray * tray |
[READ WRITE] The transmitted vector (can be modified in MaterialData::ChangeNormal() ), only valid if shader sets VOLUMEINFO::TRANSPARENCY and only during MaterialData::CalcSurface() .
Ray * rray |
[READ WRITE] The reflected vector (can be modified in MaterialData::ChangeNormal() ), only valid if shader sets VOLUMEINFO::REFLECTION and only during MaterialData::CalcSurface() .
Vector64 p |
[READ WRITE] The surface point, this can only be modified by MaterialData::Displace() .
Vector64 bumpn |
[READ WRITE] The surface phong and bump normal.
Ray * ray |
[READ ONLY] The current eye ray. Always valid, not nullptr .
Vector64 orign |
[READ ONLY] The original surface normal.
Vector64 n |
[READ ONLY] The surface phong normal.
Vector64 dispn |
[READ ONLY] The suggested displacement direction.
Float64 dist |
[READ ONLY] The distance between
p
and
ray->p
, i.e. the ray length.
Float64 cosc |
[READ ONLY] The angle between ray vector and unbumped normal.
向量 uvw |
[READ ONLY] The surface UVW coordinates, this is invalid for volumetric shaders.
向量 delta |
[READ ONLY] The MIP sample radius. Defines the radius for the area around UVW that needs to be sampled.
If this value is ignored by a shader, it will work, but produce aliasing artefacts.
RayHitID lhit |
[READ ONLY] The surface identity.
const TexData * tex |
[READ ONLY] The surface texture, never change this pointer.
向量 ddu |
[READ ONLY] U direction vector perpendicular to n ; can be used for bump mapping if VOLUMEINFO::DUDVREQUIRED is set.
向量 ddv |
[READ ONLY] V direction vector perpendicular to n ; can be used for bump mapping if VOLUMEINFO::DUDVREQUIRED is set.
Int32 raydepth |
[READ ONLY] The depth of the actual ray.
Int32 calc_trans |
[READ ONLY] Specifies if transparency will be rendered:
Int32 calc_refl |
[READ ONLY] Specifies if reflections will be rendered:
Bool calc_shadow |
[READ ONLY] Specifies, if shadows will be rendered.
Int32 calc_illum |
[READ ONLY] Specifies, if illumination will be rendered.
If this value is
0
then VolumeData::CalcSurface() should directly return the surface color without illumination (also, no bump mapping is needed in VolumeData::ChangeNormal() etc.). This technique is used for some types of objects like the sky.
Illuminance1
automatically takes care of
calc_illum
.
Int32 calc_mip |
[READ ONLY] Specifies if MIP calculations will be done.
If this value is
0
then no MIP mapping needs to be calculated.
calc_mip
can in some cases be false, even if the shader sets VOLUMEINFO::MIPSAT.
若
calc_mip
is
false
you should not access MIP/SAT variables such as
delta
etc.
向量 pp[3] |
[READ ONLY] MIP corner points in global space.
向量 nn[3] |
[READ ONLY] MIP normals of the three other corner points.
RAYBIT raybits |
[READ ONLY] The ray information: RAYBIT
const RayLight * xlight |
The light source during shadow evaluation. Can be nullptr , always check.
const RayObject * op |
The object. Can be nullptr , always check.
Int32 recursion_id |
[READ WRITE] The plugin ID of data passed through recursion.
void* recursion_data |
[READ WRITE] The address of data passed through recursion.
Multipass * multipass |
[READ WRITE] To be filled for multipasses.
向量 back_p |
[READ ONLY] The back-projected point ( StickTextureTag ) will be generated if the shader sets the flag VOLUMEINFO::TRANSFORM or SHADERINFO::TRANSFORM for a channel shader.
向量 back_delta |
[READ ONLY] This the 'spot size' (MIP mapping value) for the back-projected point.
The back-projected point (
StickTextureTag
) will be generated if the shader sets the flag
VOLUMEINFO::TRANSFORM
(或
SHADERINFO::TRANSFORM
if it is a channel shader).
Float global_mip |
[READ ONLY] The global MIP scale.
Int32 sid |
[READ ONLY] Sub-polygon ID (only used for SPD).
Float par_u |
[READ ONLY] Barycentric U coordinate (only used for SPD).
Float par_v |
[READ ONLY] Barycentric U coordinate (only used for SPD).
SurfaceIntersection * intersection |
[READ ONLY] The intersection data. Can be nullptr , always check.
Float mb_offset |
[READ ONLY] The motion blur time offset. (Between 0.0 and 1.0 , only valid in Physical Render.)
向量 comp_color |
[READ WRITE] The diffuse component of the calculated color.
向量 comp_specular |
[READ WRITE] The specular component of the calculated color.
向量 comp_luminance |
[READ WRITE] The luminance component of the calculated color.
TexEntry* rtex[4] |
[READ ONLY] Internal . The reflection textures.
Int32 rtex_count |
[READ ONLY] Internal . The number of reflection textures in rtex .
Int32 elementIndex |
[READ ONLY] Internal . Stores the index of the currently rendering hair. May be extended to other object types eventually.
const RayPolyWeight * displacementWeight |
[READ ONLY] Private.