BumpFeatHLSL Class Reference

#include <bumpHLSL.h>

Inheritance diagram for BumpFeatHLSL:

Inheritance graph
[legend]
List of all members.

Detailed Description

Bump mapping feature for shader generation

This feature will apply bump mapping to the shader being constructed. It will do this differently depending on whether a light-normal map is present.

If one is, then it is probably an interior, and the light direction for the bumping comes from the light-normal map that is precalculated for the interior.

If the map is not present, then the light direction for the bump is passed in as a vertex shader constant.


Public Member Functions

virtual void processVert (Vector< ShaderComponent * > &componentList, GFXMaterialFeatureData &fd)
virtual void processPix (Vector< ShaderComponent * > &componentList, GFXMaterialFeatureData &fd)
virtual Material::BlendOp getBlendOp ()
 Identifies what type of blending a feature uses.
virtual Resources getResources (GFXMaterialFeatureData &fd)
 Returns the resource requirements of this feature based on what other features are present.
virtual void setTexData (Material::StageData &stageDat, GFXMaterialFeatureData &fd, RenderPassData &passData, U32 &texIndex)
 Sets textures and texture flags for current pass.
virtual String getName ()
 Returns the name of this feature.

Private Member Functions

LangElementaddBumpCoords (Vector< ShaderComponent * > &componentList)
VarsetupLightVec (Vector< ShaderComponent * > &componentList, MultiLine *meta, GFXMaterialFeatureData &fd)
 Setup lightVec in vertex shader.
VargetLightVec (Vector< ShaderComponent * > &componentList, GFXMaterialFeatureData &fd, MultiLine *meta)
 Get lightVec from tex coord or light normal map - pixel shader.


Member Function Documentation

LangElement* BumpFeatHLSL::addBumpCoords ( Vector< ShaderComponent * > &  componentList  )  [private]

Var* BumpFeatHLSL::setupLightVec ( Vector< ShaderComponent * > &  componentList,
MultiLine meta,
GFXMaterialFeatureData fd 
) [private]

Setup lightVec in vertex shader.

Var* BumpFeatHLSL::getLightVec ( Vector< ShaderComponent * > &  componentList,
GFXMaterialFeatureData fd,
MultiLine meta 
) [private]

Get lightVec from tex coord or light normal map - pixel shader.

virtual void BumpFeatHLSL::processVert ( Vector< ShaderComponent * > &  componentList,
GFXMaterialFeatureData fd 
) [virtual]

Process vertex shader - This function is used by each feature to generate a list of LangElements that can be traversed and "printed" to generate the actual shader code. The 'output' member is the head of that list.

The componentList is used mostly for access to the "Connector" structure which is used to pass data from the vertex to the pixel shader.

The GFXMaterialFeatureData parameter is used to determine what other features are present for the shader being generated.

Reimplemented from ShaderFeature.

virtual void BumpFeatHLSL::processPix ( Vector< ShaderComponent * > &  componentList,
GFXMaterialFeatureData fd 
) [virtual]

Process pixel shader - This function is used by each feature to generate a list of LangElements that can be traversed and "printed" to generate the actual shader code. The 'output' member is the head of that list.

The componentList is used mostly for access to the "Connector" structure which is used to pass data from the vertex to the pixel shader.

The GFXMaterialFeatureData parameter is used to determine what other features are present for the shader being generated.

Reimplemented from ShaderFeature.

virtual Material::BlendOp BumpFeatHLSL::getBlendOp (  )  [inline, virtual]

Identifies what type of blending a feature uses.

This is used to group features with the same blend operation together in a multipass situation.

Reimplemented from ShaderFeature.

virtual Resources BumpFeatHLSL::getResources ( GFXMaterialFeatureData fd  )  [virtual]

Returns the resource requirements of this feature based on what other features are present.

The "resources" are things such as texture units, and texture registers of which there can be very limited numbers. The resources can vary depending on hardware and what other features are present.

Reimplemented from ShaderFeature.

virtual void BumpFeatHLSL::setTexData ( Material::StageData stageDat,
GFXMaterialFeatureData fd,
RenderPassData passData,
U32 texIndex 
) [virtual]

Sets textures and texture flags for current pass.

Reimplemented from ShaderFeature.

virtual String BumpFeatHLSL::getName (  )  [inline, virtual]

Returns the name of this feature.

Reimplemented from ShaderFeatureHLSL.