Torque3D Documentation / _generateds / ProcessedShaderMaterial

ProcessedShaderMaterial

Engine/source/materials/processedShaderMaterial.h

More...

Classes:

class

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

Creates passes for the given stage.

Fills in the MaterialFeatureData for the given stage.

bool

Do we have a cubemap on pass?

Used by setTextureTransforms.

Sets texture transformation matrices for texture animations such as scale and wave.

Sets all of the necessary shader constants for the given pass.

Private Types

Public Functions

This is here to deal with the differences between ProcessedCustomMaterials and ProcessedShaderMaterials.

Dump shader info, or FF texture info?

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)

Sets the given vertex and primitive buffers so we can render geometry.

Sets any custom shader data.

setNodeTransforms(const MatrixF * address, const U32 numTransforms, const U32 pass)

Sets the node transforms for HW Skinning.

Sets the scene info like lights for the given 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

Sets up the given pass.

bool

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.

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

Protected Functions

_getRPD(const U32 pass)

_initMaterialParameters()

_setPrimaryLightConst(const LightInfo * light, const MatrixF & objTrans, const U32 stageNum)