ShaderFeature Class Reference#include <shaderFeature.h>
Inheritance diagram for ShaderFeature: ![]() Detailed DescriptionThe ShaderFeature class is the base class for every procedurally generated feature. Each feature the engine recognizes is part of the enum in GFXMaterialFeatureData. That structure is used to indicate which features are present in a shader to be generated. This is useful as many ShaderFeatures will output different code depending on what other features are going to be in the shader.Shaders are generated using the ShaderFeature interface, so all of the descendants interact pretty much the same way.
Constructor & Destructor Documentation
Member Function Documentation
returns output from a processed vertex or pixel shader
Get the incoming base texture coords - useful for bumpmap and detail maps.
Implemented in ShaderFeatureGLSL, and ShaderFeatureHLSL.
Set up a texture space matrix - to pass into pixel shader.
Implemented in ShaderFeatureGLSL, and ShaderFeatureHLSL.
Expand and assign a normal map. This takes care of compressed normal maps as well.
Implemented in ShaderFeatureGLSL, and ShaderFeatureHLSL.
Get the color assignment - helper function.
Implemented in ShaderFeatureGLSL, and ShaderFeatureHLSL.
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 in DynamicLightingFeatureGLSL, DynamicLightingFeatureHLSL, BumpFeatGLSL, PixelSpecularGLSL, VertPositionGLSL, VertLightColorGLSL, BaseTexFeatGLSL, LightmapFeatGLSL, DetailFeatGLSL, LightNormMapFeatGLSL, ReflectCubeFeatGLSL, FogFeatGLSL, BumpFeatHLSL, PixelSpecularHLSL, VertPositionHLSL, VertLightColorHLSL, BaseTexFeatHLSL, LightmapFeatHLSL, DetailFeatHLSL, LightNormMapFeatHLSL, ReflectCubeFeatHLSL, and FogFeatHLSL.
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 in ExposureFeatureX2GLSL, DynamicLightingFeatureGLSL, SelfIlluminationFeatureGLSL, ExposureFeatureX2HLSL, DynamicLightingFeatureHLSL, SelfIlluminationFeatureHLSL, BumpFeatGLSL, PixelSpecularGLSL, VertLightColorGLSL, BaseTexFeatGLSL, DiffuseFeatureGLSL, LightmapFeatGLSL, DetailFeatGLSL, LightNormMapFeatGLSL, ReflectCubeFeatGLSL, FogFeatGLSL, VisibilityFeatGLSL, ColorMultiplyFeatGLSL, BumpFeatHLSL, PixelSpecularHLSL, VertLightColorHLSL, BaseTexFeatHLSL, DiffuseFeatureHLSL, LightmapFeatHLSL, DetailFeatHLSL, LightNormMapFeatHLSL, ReflectCubeFeatHLSL, FogFeatHLSL, VisibilityFeatHLSL, and ColorMultiplyFeatHLSL.
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 in ExposureFeatureX2GLSL, DynamicLightingFeatureGLSL, DynamicLightingDummyFeatureGLSL, SelfIlluminationFeatureGLSL, ExposureFeatureX2HLSL, DynamicLightingFeatureHLSL, DynamicLightingDummyFeatureHLSL, SelfIlluminationFeatureHLSL, BumpFeatGLSL, VertLightColorGLSL, BaseTexFeatGLSL, DiffuseFeatureGLSL, LightmapFeatGLSL, DetailFeatGLSL, LightNormMapFeatGLSL, FogFeatGLSL, TexAnimGLSL, VisibilityFeatGLSL, ColorMultiplyFeatGLSL, BumpFeatHLSL, VertLightColorHLSL, BaseTexFeatHLSL, DiffuseFeatureHLSL, LightmapFeatHLSL, DetailFeatHLSL, LightNormMapFeatHLSL, FogFeatHLSL, TexAnimHLSL, VisibilityFeatHLSL, and ColorMultiplyFeatHLSL.
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 in DynamicLightingFeatureGLSL, DynamicLightingFeatureHLSL, BumpFeatGLSL, PixelSpecularGLSL, BaseTexFeatGLSL, LightmapFeatGLSL, DetailFeatGLSL, LightNormMapFeatGLSL, ReflectCubeFeatGLSL, FogFeatGLSL, BumpFeatHLSL, PixelSpecularHLSL, BaseTexFeatHLSL, LightmapFeatHLSL, DetailFeatHLSL, LightNormMapFeatHLSL, ReflectCubeFeatHLSL, and FogFeatHLSL.
Fills texture related info in RenderPassData for this feature. It takes into account the current pass (passData) as well as what other data is available to the material stage (stageDat). For instance, ReflectCubeFeatHLSL would like to modulate its output by the alpha channel of another texture. If the current pass does not contain a diffuse or bump texture, but the Material does, then this function allows it to use one of those textures in the current pass. Reimplemented in DynamicLightingFeatureGLSL, DynamicLightingFeatureHLSL, BumpFeatGLSL, BaseTexFeatGLSL, LightmapFeatGLSL, DetailFeatGLSL, LightNormMapFeatGLSL, ReflectCubeFeatGLSL, FogFeatGLSL, BumpFeatHLSL, BaseTexFeatHLSL, LightmapFeatHLSL, DetailFeatHLSL, LightNormMapFeatHLSL, ReflectCubeFeatHLSL, and FogFeatHLSL.
Returns the name of this feature.
Implemented in ExposureFeatureX2GLSL, ExposureFeatureX4GLSL, DynamicLightingFeatureGLSL, DynamicLightingDummyFeatureGLSL, SelfIlluminationFeatureGLSL, ExposureFeatureX2HLSL, ExposureFeatureX4HLSL, DynamicLightingFeatureHLSL, DynamicLightingDummyFeatureHLSL, SelfIlluminationFeatureHLSL, BumpFeatGLSL, PixelSpecularGLSL, ShaderFeatureGLSL, VertPositionGLSL, VertLightColorGLSL, BaseTexFeatGLSL, DiffuseFeatureGLSL, LightmapFeatGLSL, DetailFeatGLSL, LightNormMapFeatGLSL, ReflectCubeFeatGLSL, FogFeatGLSL, TexAnimGLSL, VisibilityFeatGLSL, ColorMultiplyFeatGLSL, BumpFeatHLSL, PixelSpecularHLSL, ShaderFeatureHLSL, VertPositionHLSL, VertLightColorHLSL, BaseTexFeatHLSL, DiffuseFeatureHLSL, LightmapFeatHLSL, DetailFeatHLSL, LightNormMapFeatHLSL, ReflectCubeFeatHLSL, FogFeatHLSL, TexAnimHLSL, VisibilityFeatHLSL, and ColorMultiplyFeatHLSL.
Adds a dependency to this shader feature.
Gets the dependency list for this shader feature.
Member Data Documentation
|