IFXShaderPainter |
The ShaderPainter interface is used to achieve a cartoon style shading of a model. Several parameters can be adjusted to achieve a cartoon style, a gradient style, or a black and white style.
Cartoon style gives the model a cartoon appearance. For each color, only two colors are used to simulate the limited number of colors traditionally used in animation. The color transition line (from highlight to shadow, for example) can be adjusted by changing the resolution or by adjusting the shadow and highlight resolution.
Gradient style renders a transition from one color to another, with discrete transitions between the colors rather than a smooth blend.
Black and White style uses only black and white to shade the models, as in a black and white cartoon.
When to Use
The ShaderPainter is used by the Render() method of the modifier and is part of the Shader chain.
|
Interface Methods |
Description |
|
Returns the material ID number |
|
|
Returns a pointer to the scenegraph |
|
|
Returns number of texels used for shading |
|
|
Returns weighting on the shadow color |
|
|
Returns weighting on highlight color |
|
|
Returns enum of current style |
|
|
Returns number of texels used for shadow color |
|
|
Returns number of texels used for highlight color |
|
|
Sets the material ID number |
|
|
Sets number of texels used for shading |
|
|
Sets weighting on the shadow color |
|
|
Sets weighting on highlight color |
|
|
Sets enum of current style |
|
|
Sets number of texels used for shadow color |
|
|
Sets number of texels used for highlight color |
This methods gets the material ID number for the shader.
Parameters:
|
puID |
Pointer to the material ID number |
This method gets the scenegraph that uses the shader.
Parameters:
|
ppOutSceneGraph |
Pointer to the scenegraph |
This method retrieves the number of shading texels.
Parameters:
|
puResolution |
Number of texels used for shading |
Comments:
Must be power of 2.
This method retrieves the shadow color value.
Parameters:
|
puShadowFactor |
Value allowing adjustment of shadow color |
Comments:
Lighting will compute a value for the material that may be darker or lighter than the author intends. This acts as a bias term on the shadow color.
This method retrieves the highlight color value.
Parameters:
|
puShadowFactor |
Value allowing adjustment of highlight color |
Comments:
Lighting will compute a value for the material that may be darker or lighter than the author intends. This acts as a bias term on the shadow color.
This method retrieves the style type (gradient, toon, or black and white).
Parameters:
|
PuStyle |
Returns enumeration of style types supported |
Enumeration of the type.
IFX_SHADE_STYLE_GRADIENT,
IFX_SHADE_STYLE_TOON,
IFX_SHADE_STYLE_BLACK_AND_WHITE
This method retrieves the number of shadow texels.
Parameters:
|
puShadowResolution |
Adjusts number of shadow texels |
Comments:
Allows the adjustment of the hard edge between the shadow and highlight color. Must be less than or equal to the resolution of the whole texture (shadow+highlight resolution).
This method retrieves the number of highlight texels.
Parameters:
|
puHighlightResolution |
Pointer to the number of highlight texels |
Comments:
Allows the adjustment of the hard edge between the shadow and highlight color. Must be less than or equal to the resolution of the whole texture (shadow+highlight resolution).
This methods sets the material ID number for the shader.
Parameters:
|
uID |
Material ID number |
This method sets the number of shading texels.
Parameters:
|
puResolution |
Adjusts number of texels used in mesh |
Comments:
Allows the adjustment of the hard edge between the shadow and highlight color.
This method sets the shadow color value.
Parameters:
|
fShadowFactor |
Adjusts level of shadow color |
Return Values:
None
This method sets the highlight color value.
Parameters:
|
fHighlightFactor |
Adjusts level of highlight color |
Return Values:
None
This method sets the style type (toon).
Parameters:
|
uToonStyle |
Enumeration of the type |
This method sets the number of shadow texels.
Parameters:
|
uShadowResolution |
Adjusts level of shadow resolution |
This method sets the number of highlight texels.
Parameters:
|
fHighlightFactor |
Adjusts level of highlight color |
§See asterisked (*) statement at Legal Information © 2001 Intel Corporation.