Inheritance diagram for I3DExShader:

Public Member Functions | |
| virtual boolean MCCOMAPI | IsEqualTo (I3DExShader *aShader)=0 |
| virtual MCCOMErr MCCOMAPI | GetShadingFlags (ShadingFlags &theFlags)=0 |
| virtual boolean MCCOMAPI | WantsTransform ()=0 |
| virtual EShaderOutput MCCOMAPI | GetImplementedOutput ()=0 |
| virtual boolean MCCOMAPI | HasExplicitLightingModel (const LightingContext &lightingContext)=0 |
| virtual void MCCOMAPI | ShadeAndLight (LightingDetail &result, const LightingContext &lightingContext, I3DShShader *inShader)=0 |
| virtual MCCOMErr MCCOMAPI | DoShade (ShadingOut &result, ShadingIn &shadingIn)=0 |
| virtual real MCCOMAPI | GetValue (real &result, boolean &fullArea, ShadingIn &shadingIn)=0 |
| virtual real MCCOMAPI | GetColor (TMCColorRGBA &result, boolean &fullArea, ShadingIn &shadingIn)=0 |
| virtual real MCCOMAPI | GetVector (TVector3 &result, ShadingIn &shadingIn)=0 |
| virtual MCCOMErr MCCOMAPI | GetBump (TVector3 &result, ShadingIn &shadingIn)=0 |
| virtual void MCCOMAPI | ConvertToPoly (TMCArray< TVector2 > *vertices)=0 |
| virtual boolean MCCOMAPI | OutlineInPreviewMode ()=0 |
| virtual boolean MCCOMAPI | Contains (ShadingIn &shadingIn, TVector2 &localUV)=0 |
| virtual MCCOMErr MCCOMAPI | GetOriginalParametricTextureMap (const uint32 &uvSpaceID, const uint32 &channelIndex, IShTextureMap **outMap)=0 |
Shaders are designed to be re-entrant such that the output from one shader can be used as the input for another shader. This is accomplished by implementing methods to return a value, color, or complete shading structure and then using GetShadingFlags() and GetImplementedOutput() to define which implementation was used. Methods that return simply a value, color, or vector use the "ShadingIn" struct, filling in the fields as defined by GetShadingFlags() independent of the channel in which the shader is placed. A shader that implements an entire shading structure uses a "ShadingOut" structure that sets values for a ShadingIn structure for each channel of the shader.
Lighting Model: shaders can override the default lighting model to provide a more accurate definition of the surface properties. This allows to simulate effects such as anisotropic material or glass with fresnel effect. You could also use a shader to implement a global illumination effect that only applies to certain objects.
Note: When implementing a shader with sub-shaders in their PMap, the shaders ID must have a specific name to be properly copied when the shader parent is replaced by another shader accepting sub-shaders.( replacement is done in TComponentTreePart::RetrieveComponent ) Complex shaders ( Operators, Mixers, Curve Editor, Color Gradient ) use the following norm: 'Sh00', 'Sh01', 'Sh02', ... for naming their shaders in the PMap.
|
||||||||||||
|
Returns true if a point in uv coordinates is contained in the shape of the shaders (used for shape shaders only).
Implemented in TBasicShader. |
|
|
must be implemented to allow a shader to display an outline. This is typically used by layers such as ’rectangle’, ’ellipse’, and ’polygon’
Implemented in TBasicShader. |
|
||||||||||||
|
Returns the shading at a given point as described in the shadingIn. Note that you also need to fill the fCurrentCompletionMask of shadingIn with the channels that your shader is actually filling (this allows to have shaders that only after certain channel without modifying the others in a layered shader). Note that the alpha is not premultiplied in the shading.
Implemented in TBasicShader. |
|
||||||||||||
|
not supported in current version Implemented in TBasicShader. |
|
||||||||||||||||
|
Calculates the color of a shader for given point described in shadingIn. Note that the alpha is not premultiplied in the shading ! (But it is in the lighting calculation)
Implemented in TBasicShader. |
|
|
Determines which methods the Shader actually implements. Return only one of the following values if you implement only one of the methods. If more than one is implemented then return the result as the OR of the two values return kUsesGetValue | kUsesGetColor; Implemented in TBasicShader. |
|
||||||||||||||||
|
Returns the original texture map when no special projections mappings.
Implemented in TBasicShader. |
|
|
specifies which parameters the shader will need to perform shading calculations. If the shader is a constant shader which values does not depend on any of the ShadingIn parameters then it should set the fCallOnce flag in theFlags to true. See the description of the ShadingFlags structure for more details.
Implemented in TBasicShader. |
|
||||||||||||||||
|
Calculates the value of the shader at a given point described in shadingIn.
Implemented in TBasicShader. |
|
||||||||||||
|
Returns a perturbation of the normal in local coordinates. This perturbation is then added to the orginal normal of the point to calculate the bump.
Implemented in TBasicShader. |
|
|
Returns true if there is an explicit lighting model in the subtree. This is mostly used for layer lists to determine if DoShade or ShadeAndLight should be called on the layer.
Implemented in TBasicShader. |
|
|
Compares the values of two shaders. IsEqualTo() must first get a pointer on the same interface as itself before comparing the values.
Implemented in TBasicShader. |
|
|
Return True if the shader will draw an outline. ConvertToPoly() must then be implemented. This is typically used by layers such as ’rectangle’, ’ellipse’, and ’polygon’ Implemented in TBasicShader. |
|
||||||||||||||||
|
Calculates the shading and lighting in one point. There is a default implementation of the phong shading in TBasicShader. You should only override this method if you want to implement advanced lighting effects in your shader.
Implemented in TBasicShader. |
|
|
Returns true if the shader needs a transform tab. This is only useful if your shader relies on 3D coodinates and not UV coordinates. Implemented in TBasicShader. |
1.3.9.1