Multipass Struct Reference

#include <c4d_shader.h>

Detailed Description

These values have to be filled by custom illumination models:

Public Attributes

VPBitmap ** bmp
 
Int32ind
 
Floatresult
 
Int32 cnt
 
Int32 cmp
 
Vector ** diffuse
 
Int32 diffuse_cnt
 
Vector ** specular
 
Int32 specular_cnt
 
Vector ** shadow
 
Int32 shadow_cnt
 
RayLight ** light
 
Int32 light_cnt
 
Float ** ochannel
 
Int32ochannelid
 
Int32 ochannel_cnt
 
Vectorvp_ambient
 
Vectorvp_diffuse
 
Vectorvp_specular
 
Vectorvp_shadow
 
Vectorvp_reflection
 
Vectorvp_transparency
 
Vectorvp_radiosity
 
Vectorvp_caustics
 
Vectorvp_illumination
 
Vectorvp_mat_color
 
Vectorvp_mat_luminance
 
Vectorvp_mat_transparency
 
Vectorvp_mat_reflection
 
Vectorvp_mat_environment
 
Vectorvp_mat_specularcolor
 
Vectorvp_atmosphere
 
Floatvp_depth
 
Floatvp_mat_specular
 
Floatvp_mat_diffusion
 
Floatvp_atmosphere_mul
 
Vectorvp_ambientocclusion
 
Vectorvp_mat_uv
 
Vectorvp_mat_normal
 
Vectorvp_motionvector
 
Vector ** rchannel
 
Vector ** schannel
 
Int32 rchannel_cnt
 
Int32 schannel_cnt
 
Vectorvp_direct_diffuse
 
Vectorvp_indirect_diffuse
 
Vectorvp_direct_specular
 
Vectorvp_indirect_specular
 
Vectorvp_reflectance_albedo
 
Vectorvp_magicBulletLooks
 
Vector ** aov_channel
 
Int32aov_channel_id
 
Int32 aov_channel_cnt
 

Member Data Documentation

◆ bmp

VPBitmap** bmp

Internal. An array of @ref cnt VPBitmaps.

◆ ind

Int32* ind

The index into the components for all layers.
Examples:

  • Standard rendering:
    cnt == 1
    cmp == 4 (R,G,B, Alpha)
    ind[0] = 0
    result[0..3] : R,G,B, Alpha component
    @ R
    HPB rotation morphing.
    @ B
    Quality B.
    Float * result
    The result of all components.
    Definition: c4d_shader.h:941
    Int32 cnt
    The number of layers, for instance 1 for the main RGB layer.
    Definition: c4d_shader.h:942
    Int32 cmp
    The number of components.
    Definition: c4d_shader.h:943
    Int32 * ind
    Definition: c4d_shader.h:923
  • Multilayer rendering:
    cnt == 3
    cmp == 8 (R,G,B, Alpha, Diffuse R, Diffuse G, Diffuse B, Depth Channel)
    ind[0] = 0
    ind[1] = 4
    ind[2] = 7
    result[0..7] : R,G,B, Alpha, Diffuse R, Diffuse G, Diffuse B, Depth component

◆ result

Float* result

The result of all components.

◆ cnt

Int32 cnt

The number of layers, for instance 1 for the main RGB layer.

◆ cmp

Int32 cmp

The number of components.

◆ diffuse

Vector** diffuse

The diffuse components.

◆ diffuse_cnt

Int32 diffuse_cnt

The number of diffuse components.

◆ specular

Vector** specular

The specular components.

◆ specular_cnt

Int32 specular_cnt

The number of specular components.

◆ shadow

Vector** shadow

The shadow components.

◆ shadow_cnt

Int32 shadow_cnt

The number of shadow components.

◆ light

RayLight** light

The array of the lights that create special light buffers. For example, if you render out a diffuse/specular pass for each light source all those lights will be listed here.

◆ light_cnt

Int32 light_cnt

The number of lights.

◆ ochannel

Float** ochannel

The object buffers, filled by Cinema 4D. An array of ochannel_cnt Float pointers.
Each Float* directly points to the value of the object buffer.

◆ ochannelid

Int32* ochannelid

The channel ID of the object buffer.

◆ ochannel_cnt

Int32 ochannel_cnt

The number of object buffers.

◆ vp_ambient

Vector* vp_ambient

The attenuated ambient from all lights plus self illuminating part for the current pixel.

◆ vp_diffuse

Vector * vp_diffuse

The diffuse illumination for the current pixel.

◆ vp_specular

Vector * vp_specular

The specular illumination for the current pixel.

◆ vp_shadow

Vector * vp_shadow

The shadow component for the current pixel.

◆ vp_reflection

Vector * vp_reflection

The reflection component for the current pixel.

◆ vp_transparency

Vector * vp_transparency

The resulting transparency for the current pixel.

◆ vp_radiosity

Vector* vp_radiosity

Currently a custom model cannot access radiosity/caustics so it do not need to be filled.

◆ vp_caustics

Vector * vp_caustics

Currently a custom model cannot access radiosity/caustics so it do not need to be filled.

◆ vp_illumination

Vector * vp_illumination

The diffuse and ambient components of the light.

◆ vp_mat_color

Vector* vp_mat_color

The diffuse illumination attenuation.

◆ vp_mat_luminance

Vector * vp_mat_luminance

Self illuminating part (luminance channel in the Cinema 4D material).

◆ vp_mat_transparency

Vector * vp_mat_transparency

The material transparency attenuation.

◆ vp_mat_reflection

Vector * vp_mat_reflection

The reflection attenuation (reflection channel in the Cinema 4D material).

◆ vp_mat_environment

Vector* vp_mat_environment

The material environment attenuation.

◆ vp_mat_specularcolor

Vector * vp_mat_specularcolor

The material specular color attenuation.

◆ vp_atmosphere

Vector * vp_atmosphere

The atmosphere component (fog and volumetric effects).

◆ vp_depth

Float* vp_depth

The depth value for the current pixel.

◆ vp_mat_specular

Float * vp_mat_specular

The material specular attenuation.

◆ vp_mat_diffusion

Float * vp_mat_diffusion

The material diffusion attenuation.

◆ vp_atmosphere_mul

Float * vp_atmosphere_mul

The atmosphere multiplier.

◆ vp_ambientocclusion

Vector* vp_ambientocclusion

The ambient occlusion.

◆ vp_mat_uv

Vector * vp_mat_uv

The UV layer.

◆ vp_mat_normal

Vector * vp_mat_normal

The normal layer.

◆ vp_motionvector

Vector * vp_motionvector

The motion vector.

◆ rchannel

Vector** rchannel

The reflection buffer.

Since
R16

◆ schannel

Vector ** schannel

The specular buffer.

Since
R16

◆ rchannel_cnt

Int32 rchannel_cnt

The number of reflections in rchannel.

Since
R16

◆ schannel_cnt

Int32 schannel_cnt

The number of specular values in schannel.

Since
R16

◆ vp_direct_diffuse

Vector* vp_direct_diffuse

Direct diffuse from Reflectance Channel.

Since
R20

◆ vp_indirect_diffuse

Vector* vp_indirect_diffuse

Indirect diffuse from Reflectance Channel.

Since
R20

◆ vp_direct_specular

Vector* vp_direct_specular

Direct specular from Reflectance Channel.

Since
R20

◆ vp_indirect_specular

Vector* vp_indirect_specular

Indirect specular from Reflectance Channel.

Since
R20

◆ vp_reflectance_albedo

Vector* vp_reflectance_albedo

Reflectance Channel Diffuse Albedo.

Since
R21

◆ vp_magicBulletLooks

Vector* vp_magicBulletLooks

Channel without Magic Bullet Looks effect.

Since
R23

◆ aov_channel

Vector** aov_channel

The object buffers, filled by Cinema 4D. An array of aov_channel_cnt Vector pointers.

Since
R21 Each Vector* directly points to the value of the object buffer.
R21

◆ aov_channel_id

Int32* aov_channel_id

The channel ID of the AOV.

Since
R21

◆ aov_channel_cnt

Int32 aov_channel_cnt

The number of AOVs.

Since
R21