class RED::RayGIReflectionColorShader

Built-in Global Illumination shader for reflection color calculations. More...

#include <REDRayGIReflectionColorShader.h>

Inherits: RenderShader.

Public functions:

RayGIReflectionColorShader ( const RED::Color & iSpecularColor, const RED::Object * iSpecularTexture, const RED::Matrix & iSpecularMatrix, RED::MESH_CHANNEL iSpecularUV, const RED::Color & iReflectiveColor, const RED::Object * iReflectiveTexture, const RED::Matrix & iReflectiveMatrix, RED::MESH_CHANNEL iReflectiveUV, const RED::Object * iFresnel, RED::Object * iResMgr, RED_RC & oErrorCode )
~RayGIReflectionColorShader ( )
virtual void *As ( const RED::CID & iCID )
virtual const void *As ( const RED::CID & iCID ) const
template< class T_As > const T_As *As ( ) const
template< class T_As > T_As *As ( )

Public static functions:

static RED_RCEvaluateFromInputParameters ( RED::RenderShader * ioShader, RED::Object * iResMgr )
static RED::CIDGetClassID ( )
static RED_RCLoadProgram ( RED::String & oString, const RED::ShaderProgramID & iID )

Detailed description:

Built-in Global Illumination shader for reflection color calculations.

This shader matches the RED::ReflectionShader. It uses the same set of parameters used to modulate the resulting ray-traced reflections during the calculation of an image. Values produced by this shader are used for global illumination calculations.

This shader is intended for use in the RED::MTL_RAYTRACE rendering pass.

This shader has one configuration:

See the REDRayGIReflectionColorShader.h file documentation for the list of all define statements used to name all parameters of this shader.

Functions documentation

public RED::RayGIReflectionColorShader::RayGIReflectionColorShader(const RED::Color &iSpecularColor,
const RED::Object *iSpecularTexture,
const RED::Matrix &iSpecularMatrix,
RED::MESH_CHANNELiSpecularUV,
const RED::Color &iReflectiveColor,
const RED::Object *iReflectiveTexture,
const RED::Matrix &iReflectiveMatrix,
RED::MESH_CHANNELiReflectiveUV,
const RED::Object *iFresnel,
RED::Object *iResMgr,
RED_RC &oErrorCode
)

RayGIReflectionColorShader construction method.

Parameters:

iSpecularColor:Specular color.
iSpecularTexture:Object specular texture. Overrides the color when set.
iSpecularMatrix:Texture matrix applied to iSpecularTexture.
iSpecularUV:Mesh UV channel to use to sample iSpecularTexture.
iReflectiveColor:Reflective color.
iReflectiveTexture:Reflective texture. Overrides the reflective color when set.
iReflectiveMatrix:Texture matrix applied to the iReflectiveTexture.
iReflectiveUV:Mesh UV channel to use for the reflective texture.
iFresnel:Must be NULL or a valid composite image. The '.w' value of the image is used as fresnel term that modulates the intensity of the reflection image being returned by this shader. RED::IImageComposite::Fresnel is a possible valid composite image for this shader.
iResMgr:The cluster's resource manager.
oErrorCode:Indicates a construction failure when not returned set to RED_OK.

RayGIReflectionColorShader destruction method.

Evaluate a shader from its input parameters.

Parameters:

ioShader:Shader to redefine using its own input parameters.
iResMgr:The cluster's resource manager.

Returns:

RED_OK if the operation has succeeded,
RED_BAD_PARAM if iShader was not valid,
RED_BAD_PARAM if an invalid parameter was found during the evaluation,
RED_ALLOC_FAILURE if a memory allocation has failed,
Other RED_RC related to shader creation can be returned.

Loads a shader program.

Generates a shader program that corresponds to the specified iID.

Parameters:

oString:The created program string.
iID:The shader program unique ID.

Returns:

RED_OK if the shader could be loaded,
RED_ALLOC_FAILURE if an allocation has failed,
RED_FAIL otherwise.
public virtual void * RED::RayGIReflectionColorShader::As(const RED::CID &iCID)

Converts the object to an instance of the given type.

Parameters:

iCID:Requested class.

Returns:

An object pointer of the given class on success, NULL otherwise.

Reimplements: RED::RenderShader::As.

public virtual const void * RED::RayGIReflectionColorShader::As(const RED::CID &iCID) const

Converts the object to an instance of the given type.

Parameters:

iCID:Requested class.

Returns:

An object pointer of the given class on success, NULL otherwise.

Reimplements: RED::RenderShader::As.

template< class T_As > public const T_As * RED::RayGIReflectionColorShader::As() const

Template version of the as const method.

Simply set T to be the class you want to retrieve an interface to.

Returns:

A pointer to a const instance of class T on success, NULL otherwise.

Reimplements: RED::RenderShader::As.

template< class T_As > public T_As * RED::RayGIReflectionColorShader::As()

Template version of the as method.

Simply set T to be the class you want to retrieve an interface to.

Returns:

A pointer to an instance of class T on success, NULL otherwise.

Reimplements: RED::RenderShader::As.