ShaderFeatureHLSL
Engine/source/shaderGen/HLSL/shaderFeatureHLSL.h
Public Functions
Var *
addOutDetailTexCoord(Vector< ShaderComponent * > & componentList, MultiLine * meta, bool useTexAnim, bool useFoliageTexCoord)
Var *
addOutWsPosition(Vector< ShaderComponent * > & componentList, bool useInstancing, MultiLine * meta)
Adds the "wsPosition" to the input connector if it doesn't exist.
assignColor(LangElement * elem, Material::BlendOp blend, LangElement * lerpElem, ShaderFeature::OutputTarget outputTarget)
Helper function for applying the color to shader output.
expandNormalMap(LangElement * sampleNormalOp, LangElement * normalDecl, LangElement * normalVar, const MaterialFeatureData & fd)
Expand and assign a normal map. This takes care of compressed normal maps as well.
Var *
getInvWorldView(Vector< ShaderComponent * > & componentList, bool useInstancing, MultiLine * meta)
Var *
getInWorldNormal(Vector< ShaderComponent * > & componentList)
Var *
getModelView(Vector< ShaderComponent * > & componentList, bool useInstancing, MultiLine * meta)
Var *
getObjTrans(Vector< ShaderComponent * > & componentList, bool useInstancing, MultiLine * meta)
Var *
getOutObjToTangentSpace(Vector< ShaderComponent * > & componentList, MultiLine * meta, const MaterialFeatureData & fd)
Returns the "objToTangentSpace" transform or creates one if this is the first feature to need it.
Var *
getOutTexCoord(const char * name, const char * type, bool useTexAnim, MultiLine * meta, Vector< ShaderComponent * > & componentList)
Var *
getOutViewToTangent(Vector< ShaderComponent * > & componentList, MultiLine * meta, const MaterialFeatureData & fd)
Returns the existing output "outViewToTangent" transform or creates one if this is the first feature to need it.
Var *
getOutWorldToTangent(Vector< ShaderComponent * > & componentList, MultiLine * meta, const MaterialFeatureData & fd)
Returns the existing output "outWorldToTangent" transform or creates one if this is the first feature to need it.
Var *
getSurface(Vector< ShaderComponent * > & componentList, MultiLine * meta, const MaterialFeatureData & fd)
Var *
getVertTexCoord(const String & name)
Get the incoming base texture coords - useful for bumpmap and detail maps.
Var *
getWorldView(Vector< ShaderComponent * > & componentList, bool useInstancing, MultiLine * meta)
getWsPosition(Vector< ShaderComponent * > & componentList, bool useInstancing, MultiLine * meta, LangElement * wsPosition)
Calculates the world space position in the vertex shader and assigns it to the passed language element.
setupTexSpaceMat(Vector< ShaderComponent * > & componentList, Var ** texSpaceMat)
Set up a texture space matrix - to pass into pixel shader.
Public Static Functions
Var *
addOutVpos(MultiLine * meta, Vector< ShaderComponent * > & componentList)
Var *
getInColor(const char * name, const char * type, Vector< ShaderComponent * > & componentList)
Var *
getInTexCoord(const char * name, const char * type, Vector< ShaderComponent * > & componentList)
Returns an input texture coord by name adding it to the input connector if it doesn't exist.
Var *
getInViewToTangent(Vector< ShaderComponent * > & componentList)
Returns the input "viewToTangent" space transform adding it to the input connector if it doesn't exist.
Var *
getInVpos(MultiLine * meta, Vector< ShaderComponent * > & componentList)
Returns the VPOS input register for the pixel shader.
Var *
getInWorldToTangent(Vector< ShaderComponent * > & componentList)
Returns the input "worldToTanget" space transform adding it to the input connector if it doesn't exist.
Var *
getInWsPosition(Vector< ShaderComponent * > & componentList)
Returns the input world space position from the connector.
Var *
Returns the input normal map texture.
Detailed Description
Public Functions
ShaderFeatureHLSL()
addOutDetailTexCoord(Vector< ShaderComponent * > & componentList, MultiLine * meta, bool useTexAnim, bool useFoliageTexCoord)
addOutWsPosition(Vector< ShaderComponent * > & componentList, bool useInstancing, MultiLine * meta)
Adds the "wsPosition" to the input connector if it doesn't exist.
assignColor(LangElement * elem, Material::BlendOp blend, LangElement * lerpElem, ShaderFeature::OutputTarget outputTarget)
Reimplemented from: ShaderFeature
expandNormalMap(LangElement * sampleNormalOp, LangElement * normalDecl, LangElement * normalVar, const MaterialFeatureData & fd)
Reimplemented from: ShaderFeature
getInvWorldView(Vector< ShaderComponent * > & componentList, bool useInstancing, MultiLine * meta)
getInWorldNormal(Vector< ShaderComponent * > & componentList)
getModelView(Vector< ShaderComponent * > & componentList, bool useInstancing, MultiLine * meta)
getObjTrans(Vector< ShaderComponent * > & componentList, bool useInstancing, MultiLine * meta)
getOutObjToTangentSpace(Vector< ShaderComponent * > & componentList, MultiLine * meta, const MaterialFeatureData & fd)
Returns the "objToTangentSpace" transform or creates one if this is the first feature to need it.
getOutTexCoord(const char * name, const char * type, bool useTexAnim, MultiLine * meta, Vector< ShaderComponent * > & componentList)
getOutViewToTangent(Vector< ShaderComponent * > & componentList, MultiLine * meta, const MaterialFeatureData & fd)
Returns the existing output "outViewToTangent" transform or creates one if this is the first feature to need it.
getOutWorldToTangent(Vector< ShaderComponent * > & componentList, MultiLine * meta, const MaterialFeatureData & fd)
Returns the existing output "outWorldToTangent" transform or creates one if this is the first feature to need it.
getSurface(Vector< ShaderComponent * > & componentList, MultiLine * meta, const MaterialFeatureData & fd)
getVertTexCoord(const String & name)
Reimplemented from: ShaderFeature
getWorldView(Vector< ShaderComponent * > & componentList, bool useInstancing, MultiLine * meta)
getWsPosition(Vector< ShaderComponent * > & componentList, bool useInstancing, MultiLine * meta, LangElement * wsPosition)
Calculates the world space position in the vertex shader and assigns it to the passed language element.
It does not pass it across the connector to the pixel shader.
setupTexSpaceMat(Vector< ShaderComponent * > & componentList, Var ** texSpaceMat)
Reimplemented from: ShaderFeature
Public Static Functions
addOutVpos(MultiLine * meta, Vector< ShaderComponent * > & componentList)
getInColor(const char * name, const char * type, Vector< ShaderComponent * > & componentList)
getInTexCoord(const char * name, const char * type, Vector< ShaderComponent * > & componentList)
Returns an input texture coord by name adding it to the input connector if it doesn't exist.
getInViewToTangent(Vector< ShaderComponent * > & componentList)
Returns the input "viewToTangent" space transform adding it to the input connector if it doesn't exist.
getInVpos(MultiLine * meta, Vector< ShaderComponent * > & componentList)
Returns the VPOS input register for the pixel shader.
getInWorldToTangent(Vector< ShaderComponent * > & componentList)
Returns the input "worldToTanget" space transform adding it to the input connector if it doesn't exist.
getInWsPosition(Vector< ShaderComponent * > & componentList)
Returns the input world space position from the connector.
getNormalMapTex()
Returns the input normal map texture.
getWsView(Var * wsPosition, MultiLine * meta)
Returns the world space view vector from the wsPosition.