ProcessedShaderMaterial Class Reference#include <processedShaderMaterial.h>
Inheritance diagram for ProcessedShaderMaterial:
[legend]List of all members.
|
Public Member Functions |
| ProcessedShaderMaterial () |
| ProcessedShaderMaterial (Material &mat) |
| ~ProcessedShaderMaterial () |
virtual void | dumpMaterialInfo () |
| Dump shader info, or FF texture info?
|
virtual void | init (const GFXMaterialFeatureData::FeatureListHandle &features, GFXVertexFlags vertFlags) |
| Creates the passes, generates our shaders, and all that other initialization stuff.
|
virtual bool | setupPass (SceneState *, const SceneGraphData &sgData, U32 pass) |
| Sets up the given pass for rendering.
|
virtual void | cleanup (U32 pass) |
| Cleans up the given pass (or will anyways).
|
virtual MaterialParameters * | allocMaterialParameters () |
| Returns a shader constant block.
|
virtual MaterialParameters * | getDefaultMaterialParameters () |
virtual MaterialParameterHandle * | getMaterialParameterHandle (const String &name) |
virtual U32 | getNumStages () |
| Gets the number of stages we're using (not to be confused with the number of passes!).
|
|
virtual void | setTextureStages (SceneState *, const SceneGraphData &sgData, U32 pass) |
| Binds all of the necessary textures for the given pass.
|
virtual void | setTransforms (const MatrixF &world, const MatrixF &view, const MatrixF &projection, const U32 pass) |
| Sets the transformation matrices.
|
virtual void | setLightInfo (SceneState *, const SceneGraphData &sgData, U32 pass) |
| Sets the light info for a given pass.
|
virtual void | setEyePosition (MatrixF objTrans, Point3F position, U32 pass) |
| Sets VC_EYE_POS in the current shader and additionally sets VC_CUBE_EYE_POS if we have a cubemaps.
|
Protected Member Functions |
void | _setPrimaryLightConst (const LightInfo *light, const MatrixF &objTrans, const U32 stageNum) |
virtual GFXShaderConstBuffer * | _getShaderConstBuffer (const U32 pass) |
| This is here to deal with the differences between ProcessedCustomMaterials and ProcessedShaderMaterials.
|
virtual ShaderConstHandles * | _getShaderConstHandles (const U32 pass) |
virtual void | _initMaterialParameters () |
void | _setObjectXForm (MatrixF xform, U32 pass) |
ShaderRenderPassData * | _getRPD (const U32 pass) |
|
virtual void | _addPass (ShaderRenderPassData &rpd, U32 &texIndex, GFXMaterialFeatureData &fd, U32 stageNum, const GFXMaterialFeatureData::FeatureListHandle &features) |
| Adds a pass for the given stage.
|
virtual void | _setPassBlendOp (ShaderFeature *sf, ShaderRenderPassData &passData, U32 &texIndex, GFXMaterialFeatureData &stageFeatures, U32 stageNum, const GFXMaterialFeatureData::FeatureListHandle &features) |
| Chooses a blend op for the given pass.
|
virtual void | _createPasses (GFXMaterialFeatureData &fd, U32 stageNum, const GFXMaterialFeatureData::FeatureListHandle &features) |
| Creates passes for the given stage.
|
virtual void | _determineFeatures (U32 stageNum, GFXMaterialFeatureData &fd, const GFXMaterialFeatureData::FeatureListHandle &features) |
| Fills in the GFXMaterialFeatureData for the given stage.
|
virtual bool | _hasCubemap (U32 pass) |
| Do we have a cubemap on pass?
|
F32 | _getWaveOffset (U32 stage) |
| Used by setTextureTransforms.
|
virtual void | _setStageData () |
| Loads textures and such for all of our stages.
|
virtual void | _setTextureTransforms (const U32 pass) |
| Sets texture transformation matrices for texture animations such as scale and wave.
|
virtual void | _setShaderConstants (SceneState *, const SceneGraphData &sgData, U32 pass) |
| Sets all of the necessary shader constants for the given pass.
|
Protected Attributes |
Vector< GFXShaderConstDesc > | mShaderConstDesc |
MaterialParameters * | mDefaultParameters |
Vector< ShaderMaterialParameterHandle * > | mParameterHandles |
Private Types |
typedef ProcessedMaterial | Parent |
Member Typedef Documentation
Constructor & Destructor Documentation
ProcessedShaderMaterial::ProcessedShaderMaterial |
( |
|
) |
|
ProcessedShaderMaterial::ProcessedShaderMaterial |
( |
Material & |
mat |
) |
|
ProcessedShaderMaterial::~ProcessedShaderMaterial |
( |
|
) |
|
Member Function Documentation
virtual void ProcessedShaderMaterial::dumpMaterialInfo |
( |
|
) |
[virtual] |
virtual void ProcessedShaderMaterial::setTransforms |
( |
const MatrixF & |
world, |
|
|
const MatrixF & |
view, |
|
|
const MatrixF & |
projection, |
|
|
const U32 |
pass | |
|
) |
| | [virtual] |
virtual void ProcessedShaderMaterial::setEyePosition |
( |
MatrixF |
objTrans, |
|
|
Point3F |
position, |
|
|
U32 |
pass | |
|
) |
| | [virtual] |
Sets VC_EYE_POS in the current shader and additionally sets VC_CUBE_EYE_POS if we have a cubemaps.
Implements ProcessedMaterial.
virtual void ProcessedShaderMaterial::cleanup |
( |
U32 |
pass |
) |
[virtual] |
virtual MaterialParameters* ProcessedShaderMaterial::allocMaterialParameters |
( |
|
) |
[virtual] |
virtual MaterialParameters* ProcessedShaderMaterial::getDefaultMaterialParameters |
( |
|
) |
[inline, virtual] |
virtual U32 ProcessedShaderMaterial::getNumStages |
( |
|
) |
[virtual] |
Gets the number of stages we're using (not to be confused with the number of passes!).
Implements ProcessedMaterial.
Adds a pass for the given stage.
Chooses a blend op for the given pass.
Creates passes for the given stage.
virtual bool ProcessedShaderMaterial::_hasCubemap |
( |
U32 |
pass |
) |
[protected, virtual] |
F32 ProcessedShaderMaterial::_getWaveOffset |
( |
U32 |
stage |
) |
[protected] |
Used by setTextureTransforms.
virtual void ProcessedShaderMaterial::_setStageData |
( |
|
) |
[protected, virtual] |
virtual void ProcessedShaderMaterial::_setTextureTransforms |
( |
const U32 |
pass |
) |
[protected, virtual] |
Sets texture transformation matrices for texture animations such as scale and wave.
Sets all of the necessary shader constants for the given pass.
void ProcessedShaderMaterial::_setPrimaryLightConst |
( |
const LightInfo * |
light, |
|
|
const MatrixF & |
objTrans, |
|
|
const U32 |
stageNum | |
|
) |
| | [protected] |
virtual GFXShaderConstBuffer* ProcessedShaderMaterial::_getShaderConstBuffer |
( |
const U32 |
pass |
) |
[protected, virtual] |
This is here to deal with the differences between ProcessedCustomMaterials and ProcessedShaderMaterials.
virtual ShaderConstHandles* ProcessedShaderMaterial::_getShaderConstHandles |
( |
const U32 |
pass |
) |
[protected, virtual] |
virtual void ProcessedShaderMaterial::_initMaterialParameters |
( |
|
) |
[protected, virtual] |
void ProcessedShaderMaterial::_setObjectXForm |
( |
MatrixF |
xform, |
|
|
U32 |
pass | |
|
) |
| | [protected] |
Member Data Documentation
|