ProcessedShaderMaterial
Engine/source/materials/processedShaderMaterial.h
Classes:
Hold the instancing state data for the material.
Internal functions
bool
_addPass(ShaderRenderPassData & rpd, U32 & texIndex, MaterialFeatureData & fd, U32 stageNum, const FeatureSet & features)
Adds a pass for the given stage.
_setPassBlendOp(ShaderFeature * sf, ShaderRenderPassData & passData, U32 & texIndex, MaterialFeatureData & stageFeatures, U32 stageNum, const FeatureSet & features)
Chooses a blend op for the given pass.
bool
_createPasses(MaterialFeatureData & fd, U32 stageNum, const FeatureSet & features)
Creates passes for the given stage.
_determineFeatures(U32 stageNum, MaterialFeatureData & fd, const FeatureSet & features)
Fills in the MaterialFeatureData for the given stage.
bool
_hasCubemap(U32 pass)
Do we have a cubemap on pass?
_getWaveOffset(U32 stage)
Used by setTextureTransforms.
_setTextureTransforms(const U32 pass)
Sets texture transformation matrices for texture animations such as scale and wave.
_setShaderConstants(SceneRenderState * , const SceneData & sgData, U32 pass)
Sets all of the necessary shader constants for the given pass.
Private Types
Parent
Protected Attributes
The instancing state if this material supports instancing.
Public Functions
ProcessedShaderMaterial(Material & mat)
_getShaderConstBuffer(const U32 pass)
This is here to deal with the differences between ProcessedCustomMaterials and ProcessedShaderMaterials.
Dump shader info, or FF texture info?
getMaterialInfo(GuiTreeViewCtrl * tree, U32 item)
Returns the number of stages we're rendering (not to be confused with the number of passes).
bool
init(const FeatureSet & features, const GFXVertexFormat * vertexFormat, const MatFeaturesDelegate & featuresDelegate)
Initializes us (eg. loads textures, creates passes, generates shaders)
setBuffers(GFXVertexBufferHandleBase * vertBuffer, GFXPrimitiveBufferHandle * primBuffer)
Sets the given vertex and primitive buffers so we can render geometry.
setCustomShaderData(Vector< CustomShaderBindingData > & shaderData, const U32 pass)
Sets any custom shader data.
setSceneInfo(SceneRenderState * , const SceneData & sgData, U32 pass)
Sets the scene info like lights for the given pass.
setTextureStages(SceneRenderState * , const SceneData & sgData, U32 pass)
Sets the textures needed for rendering the current pass.
setTransforms(const MatrixSet & matrixSet, SceneRenderState * state, const U32 pass)
Sets the transformation matrix, i.e. Model * View * Projection.
bool
setupPass(SceneRenderState * , const SceneData & sgData, U32 pass)
Sets up the given pass.
bool
Protected Functions
Detailed Description
Internal functions
_addPass(ShaderRenderPassData & rpd, U32 & texIndex, MaterialFeatureData & fd, U32 stageNum, const FeatureSet & features)
Adds a pass for the given stage.
_setPassBlendOp(ShaderFeature * sf, ShaderRenderPassData & passData, U32 & texIndex, MaterialFeatureData & stageFeatures, U32 stageNum, const FeatureSet & features)
Chooses a blend op for the given pass.
_createPasses(MaterialFeatureData & fd, U32 stageNum, const FeatureSet & features)
Creates passes for the given stage.
_determineFeatures(U32 stageNum, MaterialFeatureData & fd, const FeatureSet & features)
Fills in the MaterialFeatureData for the given stage.
Reimplemented by: ProcessedDeferredMaterial
_hasCubemap(U32 pass)
Do we have a cubemap on pass?
Reimplemented by: ProcessedCustomMaterial
_getWaveOffset(U32 stage)
Used by setTextureTransforms.
_setTextureTransforms(const U32 pass)
Sets texture transformation matrices for texture animations such as scale and wave.
_setShaderConstants(SceneRenderState * , const SceneData & sgData, U32 pass)
Sets all of the necessary shader constants for the given pass.
Private Types
typedef ProcessedMaterial Parent
Protected Attributes
MaterialParameters * mDefaultParameters
InstancingState * mInstancingState
The instancing state if this material supports instancing.
Vector< ShaderMaterialParameterHandle * > mParameterHandles
Vector< GFXShaderConstDesc > mShaderConstDesc
Public Functions
ProcessedShaderMaterial()
ProcessedShaderMaterial(Material & mat)
~ProcessedShaderMaterial()
_getShaderConstBuffer(const U32 pass)
This is here to deal with the differences between ProcessedCustomMaterials and ProcessedShaderMaterials.
_getShaderConstHandles(const U32 pass)
allocMaterialParameters()
Reimplemented from: ProcessedMaterial
Reimplemented by: ProcessedCustomMaterial
dumpMaterialInfo()
Reimplemented from: ProcessedMaterial
getDefaultMaterialParameters()
Reimplemented from: ProcessedMaterial
getMaterialInfo(GuiTreeViewCtrl * tree, U32 item)
Reimplemented from: ProcessedMaterial
getMaterialParameterHandle(const String & name)
Reimplemented from: ProcessedMaterial
getNumStages()
Reimplemented from: ProcessedMaterial
Reimplemented by: ProcessedDeferredMaterial
init(const FeatureSet & features, const GFXVertexFormat * vertexFormat, const MatFeaturesDelegate & featuresDelegate)
Reimplemented from: ProcessedMaterial
Reimplemented by: ProcessedCustomMaterial
setBuffers(GFXVertexBufferHandleBase * vertBuffer, GFXPrimitiveBufferHandle * primBuffer)
Reimplemented from: ProcessedMaterial
setCustomShaderData(Vector< CustomShaderBindingData > & shaderData, const U32 pass)
Reimplemented from: ProcessedMaterial
setNodeTransforms(const MatrixF * address, const U32 numTransforms, const U32 pass)
Reimplemented from: ProcessedMaterial
setSceneInfo(SceneRenderState * , const SceneData & sgData, U32 pass)
Reimplemented from: ProcessedMaterial
setTextureStages(SceneRenderState * , const SceneData & sgData, U32 pass)
Reimplemented from: ProcessedMaterial
Reimplemented by: ProcessedCustomMaterial
setTransforms(const MatrixSet & matrixSet, SceneRenderState * state, const U32 pass)
Reimplemented from: ProcessedMaterial
setupPass(SceneRenderState * , const SceneData & sgData, U32 pass)
Reimplemented from: ProcessedMaterial
Reimplemented by: ProcessedCustomMaterial
stepInstance()
Reimplemented from: ProcessedMaterial