RayGIReflectionColorShader
Functions
SET_CID | 
|
IMPLEMENT_AS | 
|
RayGIReflectionColorShader | 
|
~RayGIReflectionColorShader | 
|
RED_RC | 
LoadProgram | 
RED_RC | 
EvaluateFromInputParameters | 
Detailed Description
- 
class 
RayGIReflectionColorShader: public RED::RenderShader Built-in Global Illumination shader for reflection color calculations.
@related Using Built-in Render Shaders, class RED::IMaterial, class RED::RenderShader, class RED::StateShader, class RED::RenderCode
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.
Public Functions
- 
SET_CID(CID_class_REDRayGIReflectionColorShader) 
- 
IMPLEMENT_AS() 
- 
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 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() RayGIReflectionColorShader destruction method.
Public Static Functions
- 
static RED_RC 
LoadProgram(RED::String &oString, const RED::ShaderProgramID &iID) 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.
- 
static RED_RC 
EvaluateFromInputParameters(RED::RenderShader *ioShader, RED::Object *iResMgr) 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.
-