OGRE-Next  3.0.0
Object-Oriented Graphics Rendering Engine
Ogre::Pass Class Reference

Class defining a single pass of a Technique (of a Material), i.e. More...

#include <OgrePass.h>

+ Inheritance diagram for Ogre::Pass:

Public Types

typedef ConstVectorIterator< TextureUnitStates > ConstTextureUnitStateIterator
 
typedef VectorIterator< TextureUnitStates > TextureUnitStateIterator
 

Public Member Functions

 Pass (Technique *parent, unsigned short index)
 Default constructor. More...
 
 Pass (Technique *parent, unsigned short index, const Pass &oth)
 Copy constructor. More...
 
virtual ~Pass ()
 
HlmsDatablock_getDatablock () const
 Gets the internal datablock that acts as proxy for us. More...
 
size_t _getTextureUnitWithContentTypeIndex (TextureUnitState::ContentType contentType, size_t index) const
 Gets the 'nth' texture which references the given content type. More...
 
void _load ()
 Internal method for loading this pass. More...
 
void _notifyIndex (unsigned short index)
 Internal method to adjust pass index. More...
 
void _prepare ()
 Internal method for preparing to load this pass. More...
 
void _unload ()
 Internal method for unloading this pass. More...
 
void _unprepare ()
 Internal method for undoing the load preparartion for this pass. More...
 
void _updateAutoParams (const AutoParamDataSource *source, uint16 variabilityMask) const
 Update automatic parameters. More...
 
void addTextureUnitState (TextureUnitState *state)
 Adds the passed in TextureUnitState, to the existing Pass. More...
 
bool applyTextureAliases (const AliasTextureNamePairList &aliasList, const bool apply=true) const
 Applies texture names to Texture Unit State with matching texture name aliases. More...
 
size_t calculateSize () const
 
TextureUnitStatecreateTextureUnitState ()
 Inserts a new TextureUnitState object into the Pass. More...
 
TextureUnitStatecreateTextureUnitState (const String &textureName)
 Inserts a new TextureUnitState object into the Pass. More...
 
TextureUnitStatecreateTextureUnitState (const String &textureName, unsigned short texCoordSet)
 Inserts a new TextureUnitState object into the Pass. More...
 
CompareFunction getAlphaRejectFunction () const
 Gets the alpha reject function. More...
 
unsigned char getAlphaRejectValue () const
 Gets the alpha reject value. More...
 
const ColourValuegetAmbient () const
 Gets the ambient colour reflectance of the pass. More...
 
const HlmsBlendblockgetBlendblock () const
 Retrieves current blendblock. More...
 
bool getColourWriteEnabled () const
 Determines if colour buffer writing is enabled for this pass. More...
 
const GpuProgramPtrgetComputeProgram () const
 Gets the Tessellation EHull program used by this pass, only available after _load(). More...
 
const StringgetComputeProgramName () const
 Gets the name of the Tessellation Hull program used by this pass. More...
 
GpuProgramParametersSharedPtr getComputeProgramParameters () const
 Gets the Tessellation Hull program parameters used by this pass. More...
 
const ColourValuegetDiffuse () const
 Gets the diffuse colour reflectance of the pass. More...
 
const ColourValuegetEmissive () const
 Gets the self illumination colour of the pass. More...
 
const GpuProgramPtrgetFragmentProgram () const
 Gets the fragment program used by this pass, only available after _load(). More...
 
const StringgetFragmentProgramName () const
 Gets the name of the fragment program used by this pass. More...
 
GpuProgramParametersSharedPtr getFragmentProgramParameters () const
 Gets the fragment program parameters used by this pass. More...
 
const GpuProgramPtrgetGeometryProgram () const
 Gets the geometry program used by this pass, only available after _load(). More...
 
const StringgetGeometryProgramName () const
 Gets the name of the geometry program used by this pass. More...
 
GpuProgramParametersSharedPtr getGeometryProgramParameters () const
 Gets the geometry program parameters used by this pass. More...
 
uint32 getId () const
 
unsigned short getIndex () const
 Gets the index of this Pass in the parent Technique. More...
 
bool getIteratePerLight () const
 Does this pass run once for every light in range? More...
 
bool getLightClipPlanesEnabled () const
 Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the light. More...
 
unsigned short getLightCountPerIteration () const
 If light iteration is enabled, determine the number of lights per iteration. More...
 
uint32 getLightMask () const
 Gets the light mask controlling which lights are used for this pass. More...
 
bool getLightScissoringEnabled () const
 Gets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are being used in it. More...
 
const HlmsMacroblockgetMacroblock () const
 Retrieves current macroblock. More...
 
unsigned short getMaxSimultaneousLights () const
 Gets the maximum number of lights to be used by this pass. More...
 
const StringgetName () const
 Get the name of the pass. More...
 
unsigned short getNumTextureUnitStates () const
 Returns the number of texture unit settings. More...
 
Light::LightTypes getOnlyLightType () const
 Gets the single light type this pass runs for if getIteratePerLight and getRunOnlyForOneLightType are both true. More...
 
TechniquegetParent () const
 Gets the parent Technique. More...
 
size_t getPassIterationCount () const
 Gets the pass iteration count value. More...
 
Real getPointAttenuationConstant () const
 Returns the constant coefficient of point attenuation. More...
 
Real getPointAttenuationLinear () const
 Returns the linear coefficient of point attenuation. More...
 
Real getPointAttenuationQuadratic () const
 Returns the quadratic coefficient of point attenuation. More...
 
Real getPointMaxSize () const
 Get the maximum point size, when point attenuation is in use. More...
 
Real getPointMinSize () const
 Get the minimum point size, when point attenuation is in use. More...
 
Real getPointSize () const
 Gets the point size of the pass. More...
 
bool getPointSpritesEnabled () const
 Returns whether point sprites are enabled when rendering a point list. More...
 
virtual bool getPolygonModeOverrideable () const
 Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting. More...
 
const StringgetResourceGroup () const
 Gets the resource group of the ultimate parent Material. More...
 
bool getRunOnlyForOneLightType () const
 Does this pass run only for a single light type (if getIteratePerLight is true). More...
 
const ColourValuegetSelfIllumination () const
 Gets the self illumination colour of the pass. More...
 
ShadeOptions getShadingMode () const
 Returns the type of light shading to be used. More...
 
Real getShininess () const
 Gets the 'shininess' property of the pass (affects specular highlights). More...
 
const ColourValuegetSpecular () const
 Gets the specular colour reflectance of the pass. More...
 
unsigned short getStartLight () const
 Gets the light index that this pass will start at in the light list. More...
 
const GpuProgramPtrgetTessellationDomainProgram () const
 Gets the Tessellation Domain program used by this pass, only available after _load(). More...
 
const StringgetTessellationDomainProgramName () const
 Gets the name of the Domain Evaluation program used by this pass. More...
 
GpuProgramParametersSharedPtr getTessellationDomainProgramParameters () const
 Gets the Tessellation Domain program parameters used by this pass. More...
 
const GpuProgramPtrgetTessellationHullProgram () const
 Gets the Tessellation Hull program used by this pass, only available after _load(). More...
 
const StringgetTessellationHullProgramName () const
 Gets the name of the Tessellation Hull program used by this pass. More...
 
GpuProgramParametersSharedPtr getTessellationHullProgramParameters () const
 Gets the Tessellation Hull program parameters used by this pass. More...
 
TextureUnitStategetTextureUnitState (const String &name)
 Retrieves the Texture Unit State matching name. More...
 
const TextureUnitStategetTextureUnitState (const String &name) const
 Retrieves the Texture Unit State matching name. More...
 
TextureUnitStategetTextureUnitState (size_t index)
 Retrieves a pointer to a texture unit state so it may be modified. More...
 
const TextureUnitStategetTextureUnitState (size_t index) const
 Retrieves a const pointer to a texture unit state. More...
 
unsigned short getTextureUnitStateIndex (const TextureUnitState *state) const
 Retrieve the index of the Texture Unit State in the pass. More...
 
TextureUnitStateIterator getTextureUnitStateIterator ()
 Get an iterator over the TextureUnitStates contained in this Pass. More...
 
ConstTextureUnitStateIterator getTextureUnitStateIterator () const
 Get an iterator over the TextureUnitStates contained in this Pass. More...
 
UserObjectBindingsgetUserObjectBindings ()
 Return an instance of user objects binding associated with this class. More...
 
const UserObjectBindingsgetUserObjectBindings () const
 Return an instance of user objects binding associated with this class. More...
 
TrackVertexColourType getVertexColourTracking () const
 Gets which material properties follow the vertex colour. More...
 
const GpuProgramPtrgetVertexProgram () const
 Gets the vertex program used by this pass, only available after _load(). More...
 
const StringgetVertexProgramName () const
 Gets the name of the vertex program used by this pass. More...
 
GpuProgramParametersSharedPtr getVertexProgramParameters () const
 Gets the vertex program parameters used by this pass. More...
 
bool hasComputeProgram () const
 Returns true if this pass uses a programmable compute pipeline. More...
 
bool hasFragmentProgram () const
 Returns true if this pass uses a programmable fragment pipeline. More...
 
bool hasGeometryProgram () const
 Returns true if this pass uses a programmable geometry pipeline. More...
 
bool hasTessellationDomainProgram () const
 Returns true if this pass uses a programmable tessellation control pipeline. More...
 
bool hasTessellationHullProgram () const
 Returns true if this pass uses a programmable tessellation control pipeline. More...
 
bool hasVertexProgram () const
 Returns true if this pass uses a programmable vertex pipeline. More...
 
bool isAmbientOnly () const
 Returns whether this pass is ambient only. More...
 
bool isLoaded () const
 Is this loaded? More...
 
bool isPointAttenuationEnabled () const
 Returns whether points are attenuated with distance. More...
 
bool isProgrammable () const
 Returns true if this pass is programmable i.e. includes either a vertex or fragment program. More...
 
bool isTransparent () const
 Returns true if this pass has some element of transparency. More...
 
 OGRE_DEPRECATED_VER (3) bool getFogOverride() const
 Returns true if this pass is to override the scene fog settings. More...
 
 OGRE_DEPRECATED_VER (3) const ColourValue &getFogColour() const
 Returns the fog colour for the scene. More...
 
 OGRE_DEPRECATED_VER (3) FogMode getFogMode() const
 Returns the fog mode for this pass. More...
 
 OGRE_DEPRECATED_VER (3) Real getFogDensity() const
 Returns the fog density for this pass. More...
 
 OGRE_DEPRECATED_VER (3) Real getFogEnd() const
 Returns the fog end distance for this pass. More...
 
 OGRE_DEPRECATED_VER (3) Real getFogStart() const
 Returns the fog start distance for this pass. More...
 
 OGRE_MUTEX (mGpuProgramChangeMutex)
 
 OGRE_MUTEX (mTexUnitChangeMutex)
 
 OGRE_STATIC_MUTEX (msDirtyHashListMutex)
 
 OGRE_STATIC_MUTEX (msPassGraveyardMutex)
 
Passoperator= (const Pass &oth)
 Operator = overload. More...
 
void removeAllTextureUnitStates ()
 Removes all texture unit settings. More...
 
void removeTextureUnitState (unsigned short index)
 Removes the indexed texture unit state from this pass. More...
 
void setAlphaRejectFunction (CompareFunction func)
 Sets the alpha reject function. More...
 
void setAlphaRejectValue (unsigned char val)
 Gets the alpha reject value. More...
 
void setAmbient (const ColourValue &ambient)
 Sets the ambient colour reflectance properties of this pass. More...
 
void setAmbient (Real red, Real green, Real blue)
 Sets the ambient colour reflectance properties of this pass. More...
 
void setBlendblock (const HlmsBlendblock &blendblock)
 Changes the current blendblock for a new one. Pointer can't be null. More...
 
void setComputeProgram (const String &name, bool resetParams=true)
 Sets the details of the compute program to use. More...
 
void setComputeProgramParameters (GpuProgramParametersSharedPtr params)
 Sets the Tessellation Evaluation program parameters. More...
 
void setDiffuse (const ColourValue &diffuse)
 Sets the diffuse colour reflectance properties of this pass. More...
 
void setDiffuse (Real red, Real green, Real blue, Real alpha)
 Sets the diffuse colour reflectance properties of this pass. More...
 
void setEmissive (const ColourValue &emissive)
 Sets the amount of self-illumination an object has. More...
 
void setEmissive (Real red, Real green, Real blue)
 Sets the amount of self-illumination an object has. More...
 
void setFog (bool overrideScene, FogMode mode=FOG_NONE, const ColourValue &colour=ColourValue::White, Real expDensity=Real(0.001), Real linearStart=0.0, Real linearEnd=1.0)
 Sets the fogging mode applied to this pass. More...
 
void setFragmentProgram (const String &name, bool resetParams=true)
 Sets the details of the fragment program to use. More...
 
void setFragmentProgramParameters (GpuProgramParametersSharedPtr params)
 Sets the fragment program parameters. More...
 
void setGeometryProgram (const String &name, bool resetParams=true)
 Sets the details of the geometry program to use. More...
 
void setGeometryProgramParameters (GpuProgramParametersSharedPtr params)
 Sets the geometry program parameters. More...
 
void setIteratePerLight (bool enabled, bool onlyForOneLightType=true, Light::LightTypes lightType=Light::LT_POINT)
 Sets whether or not this pass should iterate per light or number of lights which can affect the object being rendered. More...
 
void setLightClipPlanesEnabled (bool enabled)
 Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the light. More...
 
void setLightCountPerIteration (unsigned short c)
 If light iteration is enabled, determine the number of lights per iteration. More...
 
void setLightMask (uint32 mask)
 Sets the light mask which can be matched to specific light flags to be handled by this pass. More...
 
void setLightScissoringEnabled (bool enabled)
 Sets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are being used in it. More...
 
void setMacroblock (const HlmsMacroblock &macroblock)
 Changes the current macroblock for a new one. Pointer can't be null. More...
 
void setMaxSimultaneousLights (unsigned short maxLights)
 Sets the maximum number of lights to be used by this pass. More...
 
void setName (const String &name)
 
void setPassIterationCount (const size_t count)
 set the number of iterations that this pass should perform when doing fast multi pass operation. More...
 
void setPointAttenuation (bool enabled, Real constant=0.0f, Real linear=1.0f, Real quadratic=0.0f)
 Sets how points are attenuated with distance. More...
 
void setPointMaxSize (Real max)
 Set the maximum point size, when point attenuation is in use. More...
 
void setPointMinSize (Real min)
 Set the minimum point size, when point attenuation is in use. More...
 
void setPointSize (Real ps)
 Sets the point size of this pass. More...
 
void setPointSpritesEnabled (bool enabled)
 Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) or plain points (dots). More...
 
virtual void setPolygonModeOverrideable (bool override)
 Sets whether this pass's chosen detail level can be overridden (downgraded) by the camera setting. More...
 
void setSamplerblock (const HlmsSamplerblock &samplerblock)
 Set samplerblock for every texture unit. More...
 
void setSelfIllumination (const ColourValue &selfIllum)
 Sets the amount of self-illumination an object has. More...
 
void setSelfIllumination (Real red, Real green, Real blue)
 Sets the amount of self-illumination an object has. More...
 
void setShadingMode (ShadeOptions mode)
 Sets the type of light shading required. More...
 
void setShininess (Real val)
 Sets the shininess of the pass, affecting the size of specular highlights. More...
 
void setSpecular (const ColourValue &specular)
 Sets the specular colour reflectance properties of this pass. More...
 
void setSpecular (Real red, Real green, Real blue, Real alpha)
 Sets the specular colour reflectance properties of this pass. More...
 
void setStartLight (unsigned short startLight)
 Sets the light index that this pass will start at in the light list. More...
 
void setTessellationDomainProgram (const String &name, bool resetParams=true)
 Sets the details of the Tessellation domain program to use. More...
 
void setTessellationDomainProgramParameters (GpuProgramParametersSharedPtr params)
 Sets the Tessellation Domain program parameters. More...
 
void setTessellationHullProgram (const String &name, bool resetParams=true)
 Support for shader model 5.0, hull and domain shaders. More...
 
void setTessellationHullProgramParameters (GpuProgramParametersSharedPtr params)
 Sets the Tessellation Hull program parameters. More...
 
void setVertexColourTracking (TrackVertexColourType tracking)
 Sets which material properties follow the vertex colour. More...
 
void setVertexProgram (const String &name, bool resetParams=true)
 Sets the details of the vertex program to use. More...
 
void setVertexProgramParameters (GpuProgramParametersSharedPtr params)
 Sets the vertex program parameters. More...
 

Static Public Member Functions

static void _getBlendFlags (SceneBlendType type, SceneBlendFactor &source, SceneBlendFactor &dest)
 Used to get scene blending flags from a blending type. More...
 

Detailed Description

Class defining a single pass of a Technique (of a Material), i.e.

a single rendering call.

Remarks
Rendering can be repeated with many passes for more complex effects.

Note: Using multiple passes hasn't been tested in Ogre-Next 2.x at all and may no longer work. It definitely needs at least RenderQueue::V1_LEGACY

Programmable passes are complex to define, because they require custom programs and you have to set all constant inputs to the programs (like the position of lights, any base material colours you wish to use etc), but they do give you much total flexibility over the algorithms used to render your pass, and you can create some effects which are impossible with a fixed-function pass.

Member Typedef Documentation

◆ ConstTextureUnitStateIterator

◆ TextureUnitStateIterator

Constructor & Destructor Documentation

◆ Pass() [1/2]

Ogre::Pass::Pass ( Technique parent,
unsigned short  index 
)

Default constructor.

◆ Pass() [2/2]

Ogre::Pass::Pass ( Technique parent,
unsigned short  index,
const Pass oth 
)

Copy constructor.

◆ ~Pass()

virtual Ogre::Pass::~Pass ( )
virtual

Member Function Documentation

◆ _getBlendFlags()

static void Ogre::Pass::_getBlendFlags ( SceneBlendType  type,
SceneBlendFactor source,
SceneBlendFactor dest 
)
static

Used to get scene blending flags from a blending type.

◆ _getDatablock()

HlmsDatablock* Ogre::Pass::_getDatablock ( ) const

Gets the internal datablock that acts as proxy for us.

◆ _getTextureUnitWithContentTypeIndex()

size_t Ogre::Pass::_getTextureUnitWithContentTypeIndex ( TextureUnitState::ContentType  contentType,
size_t  index 
) const

Gets the 'nth' texture which references the given content type.

Remarks
If the 'nth' texture unit which references the content type doesn't exist, then this method returns an arbitrary high-value outside the valid range to index texture units.

◆ _load()

void Ogre::Pass::_load ( )

Internal method for loading this pass.

◆ _notifyIndex()

void Ogre::Pass::_notifyIndex ( unsigned short  index)

Internal method to adjust pass index.

◆ _prepare()

void Ogre::Pass::_prepare ( )

Internal method for preparing to load this pass.

◆ _unload()

void Ogre::Pass::_unload ( )

Internal method for unloading this pass.

◆ _unprepare()

void Ogre::Pass::_unprepare ( )

Internal method for undoing the load preparartion for this pass.

◆ _updateAutoParams()

void Ogre::Pass::_updateAutoParams ( const AutoParamDataSource source,
uint16  variabilityMask 
) const

Update automatic parameters.

Parameters
sourceThe source of the parameters
variabilityMaskA mask of GpuParamVariability which identifies which autos will need updating

◆ addTextureUnitState()

void Ogre::Pass::addTextureUnitState ( TextureUnitState state)

Adds the passed in TextureUnitState, to the existing Pass.

Parameters
stateThe Texture Unit State to be attached to this pass. It must not be attached to another pass.
Note
Throws an exception if the TextureUnitState is attached to another Pass.

◆ applyTextureAliases()

bool Ogre::Pass::applyTextureAliases ( const AliasTextureNamePairList aliasList,
const bool  apply = true 
) const

Applies texture names to Texture Unit State with matching texture name aliases.

All Texture Unit States within the pass are checked. If matching texture aliases are found then true is returned.

Parameters
aliasListis a map container of texture alias, texture name pairs
applyset true to apply the texture aliases else just test to see if texture alias matches are found.
Returns
True if matching texture aliases were found in the pass.

◆ calculateSize()

size_t Ogre::Pass::calculateSize ( ) const

◆ createTextureUnitState() [1/3]

TextureUnitState* Ogre::Pass::createTextureUnitState ( )

Inserts a new TextureUnitState object into the Pass.

Remarks
This unit is is added on top of all previous units.

◆ createTextureUnitState() [2/3]

TextureUnitState* Ogre::Pass::createTextureUnitState ( const String textureName)

Inserts a new TextureUnitState object into the Pass.

Remarks
This unit is is added on top of all previous units.
Parameters
textureNameThe basic name of the texture e.g. brickwall.jpg, stonefloor.png
texCoordSetThe index of the texture coordinate set to use.

◆ createTextureUnitState() [3/3]

TextureUnitState* Ogre::Pass::createTextureUnitState ( const String textureName,
unsigned short  texCoordSet 
)

Inserts a new TextureUnitState object into the Pass.

Remarks
This unit is is added on top of all previous units.
Parameters
textureNameThe basic name of the texture e.g. brickwall.jpg, stonefloor.png
texCoordSetThe index of the texture coordinate set to use.

◆ getAlphaRejectFunction()

CompareFunction Ogre::Pass::getAlphaRejectFunction ( ) const
inline

Gets the alpha reject function.

See setAlphaRejectSettings for more information.

◆ getAlphaRejectValue()

unsigned char Ogre::Pass::getAlphaRejectValue ( ) const
inline

Gets the alpha reject value.

See setAlphaRejectSettings for more information.

◆ getAmbient()

const ColourValue& Ogre::Pass::getAmbient ( ) const

Gets the ambient colour reflectance of the pass.

◆ getBlendblock()

const HlmsBlendblock* Ogre::Pass::getBlendblock ( ) const

Retrieves current blendblock.

Don't const_cast the return value to modify it. See HlmsDatablock remarks.

◆ getColourWriteEnabled()

bool Ogre::Pass::getColourWriteEnabled ( ) const

Determines if colour buffer writing is enabled for this pass.

◆ getComputeProgram()

const GpuProgramPtr& Ogre::Pass::getComputeProgram ( ) const

Gets the Tessellation EHull program used by this pass, only available after _load().

◆ getComputeProgramName()

const String& Ogre::Pass::getComputeProgramName ( ) const

Gets the name of the Tessellation Hull program used by this pass.

◆ getComputeProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getComputeProgramParameters ( ) const

Gets the Tessellation Hull program parameters used by this pass.

◆ getDiffuse()

const ColourValue& Ogre::Pass::getDiffuse ( ) const

Gets the diffuse colour reflectance of the pass.

◆ getEmissive()

const ColourValue& Ogre::Pass::getEmissive ( ) const
inline

Gets the self illumination colour of the pass.

See also
getSelfIllumination

◆ getFragmentProgram()

const GpuProgramPtr& Ogre::Pass::getFragmentProgram ( ) const

Gets the fragment program used by this pass, only available after _load().

◆ getFragmentProgramName()

const String& Ogre::Pass::getFragmentProgramName ( ) const

Gets the name of the fragment program used by this pass.

◆ getFragmentProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getFragmentProgramParameters ( ) const

Gets the fragment program parameters used by this pass.

◆ getGeometryProgram()

const GpuProgramPtr& Ogre::Pass::getGeometryProgram ( ) const

Gets the geometry program used by this pass, only available after _load().

◆ getGeometryProgramName()

const String& Ogre::Pass::getGeometryProgramName ( ) const

Gets the name of the geometry program used by this pass.

◆ getGeometryProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getGeometryProgramParameters ( ) const

Gets the geometry program parameters used by this pass.

◆ getId()

uint32 Ogre::Pass::getId ( ) const
inline

◆ getIndex()

unsigned short Ogre::Pass::getIndex ( ) const
inline

Gets the index of this Pass in the parent Technique.

◆ getIteratePerLight()

bool Ogre::Pass::getIteratePerLight ( ) const
inline

Does this pass run once for every light in range?

◆ getLightClipPlanesEnabled()

bool Ogre::Pass::getLightClipPlanesEnabled ( ) const
inline

Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the light.

◆ getLightCountPerIteration()

unsigned short Ogre::Pass::getLightCountPerIteration ( ) const

If light iteration is enabled, determine the number of lights per iteration.

◆ getLightMask()

uint32 Ogre::Pass::getLightMask ( ) const

Gets the light mask controlling which lights are used for this pass.

◆ getLightScissoringEnabled()

bool Ogre::Pass::getLightScissoringEnabled ( ) const
inline

Gets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are being used in it.

◆ getMacroblock()

const HlmsMacroblock* Ogre::Pass::getMacroblock ( ) const

Retrieves current macroblock.

Don't const_cast the return value to modify it. See HlmsDatablock remarks.

◆ getMaxSimultaneousLights()

unsigned short Ogre::Pass::getMaxSimultaneousLights ( ) const

Gets the maximum number of lights to be used by this pass.

◆ getName()

const String& Ogre::Pass::getName ( ) const
inline

Get the name of the pass.

◆ getNumTextureUnitStates()

unsigned short Ogre::Pass::getNumTextureUnitStates ( ) const
inline

Returns the number of texture unit settings.

◆ getOnlyLightType()

Light::LightTypes Ogre::Pass::getOnlyLightType ( ) const
inline

Gets the single light type this pass runs for if getIteratePerLight and getRunOnlyForOneLightType are both true.

◆ getParent()

Technique* Ogre::Pass::getParent ( ) const
inline

Gets the parent Technique.

◆ getPassIterationCount()

size_t Ogre::Pass::getPassIterationCount ( ) const
inline

Gets the pass iteration count value.

◆ getPointAttenuationConstant()

Real Ogre::Pass::getPointAttenuationConstant ( ) const

Returns the constant coefficient of point attenuation.

◆ getPointAttenuationLinear()

Real Ogre::Pass::getPointAttenuationLinear ( ) const

Returns the linear coefficient of point attenuation.

◆ getPointAttenuationQuadratic()

Real Ogre::Pass::getPointAttenuationQuadratic ( ) const

Returns the quadratic coefficient of point attenuation.

◆ getPointMaxSize()

Real Ogre::Pass::getPointMaxSize ( ) const

Get the maximum point size, when point attenuation is in use.

Remarks
0 indicates the max size supported by the card.

◆ getPointMinSize()

Real Ogre::Pass::getPointMinSize ( ) const

Get the minimum point size, when point attenuation is in use.

◆ getPointSize()

Real Ogre::Pass::getPointSize ( ) const

Gets the point size of the pass.

Remarks
This property determines what point size is used to render a point list.

◆ getPointSpritesEnabled()

bool Ogre::Pass::getPointSpritesEnabled ( ) const

Returns whether point sprites are enabled when rendering a point list.

◆ getPolygonModeOverrideable()

virtual bool Ogre::Pass::getPolygonModeOverrideable ( ) const
inlinevirtual

Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting.

◆ getResourceGroup()

const String& Ogre::Pass::getResourceGroup ( ) const

Gets the resource group of the ultimate parent Material.

◆ getRunOnlyForOneLightType()

bool Ogre::Pass::getRunOnlyForOneLightType ( ) const
inline

Does this pass run only for a single light type (if getIteratePerLight is true).

◆ getSelfIllumination()

const ColourValue& Ogre::Pass::getSelfIllumination ( ) const

Gets the self illumination colour of the pass.

◆ getShadingMode()

ShadeOptions Ogre::Pass::getShadingMode ( ) const

Returns the type of light shading to be used.

◆ getShininess()

Real Ogre::Pass::getShininess ( ) const

Gets the 'shininess' property of the pass (affects specular highlights).

◆ getSpecular()

const ColourValue& Ogre::Pass::getSpecular ( ) const

Gets the specular colour reflectance of the pass.

◆ getStartLight()

unsigned short Ogre::Pass::getStartLight ( ) const

Gets the light index that this pass will start at in the light list.

◆ getTessellationDomainProgram()

const GpuProgramPtr& Ogre::Pass::getTessellationDomainProgram ( ) const

Gets the Tessellation Domain program used by this pass, only available after _load().

◆ getTessellationDomainProgramName()

const String& Ogre::Pass::getTessellationDomainProgramName ( ) const

Gets the name of the Domain Evaluation program used by this pass.

◆ getTessellationDomainProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getTessellationDomainProgramParameters ( ) const

Gets the Tessellation Domain program parameters used by this pass.

◆ getTessellationHullProgram()

const GpuProgramPtr& Ogre::Pass::getTessellationHullProgram ( ) const

Gets the Tessellation Hull program used by this pass, only available after _load().

◆ getTessellationHullProgramName()

const String& Ogre::Pass::getTessellationHullProgramName ( ) const

Gets the name of the Tessellation Hull program used by this pass.

◆ getTessellationHullProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getTessellationHullProgramParameters ( ) const

Gets the Tessellation Hull program parameters used by this pass.

◆ getTextureUnitState() [1/4]

TextureUnitState* Ogre::Pass::getTextureUnitState ( const String name)

Retrieves the Texture Unit State matching name.

Returns 0 if name match is not found.

◆ getTextureUnitState() [2/4]

const TextureUnitState* Ogre::Pass::getTextureUnitState ( const String name) const

Retrieves the Texture Unit State matching name.

Returns 0 if name match is not found.

◆ getTextureUnitState() [3/4]

TextureUnitState* Ogre::Pass::getTextureUnitState ( size_t  index)

Retrieves a pointer to a texture unit state so it may be modified.

◆ getTextureUnitState() [4/4]

const TextureUnitState* Ogre::Pass::getTextureUnitState ( size_t  index) const

Retrieves a const pointer to a texture unit state.

◆ getTextureUnitStateIndex()

unsigned short Ogre::Pass::getTextureUnitStateIndex ( const TextureUnitState state) const

Retrieve the index of the Texture Unit State in the pass.

Parameters
stateThe Texture Unit State this is attached to this pass.
Note
Throws an exception if the state is not attached to the pass.

◆ getTextureUnitStateIterator() [1/2]

TextureUnitStateIterator Ogre::Pass::getTextureUnitStateIterator ( )

Get an iterator over the TextureUnitStates contained in this Pass.

◆ getTextureUnitStateIterator() [2/2]

ConstTextureUnitStateIterator Ogre::Pass::getTextureUnitStateIterator ( ) const

Get an iterator over the TextureUnitStates contained in this Pass.

◆ getUserObjectBindings() [1/2]

UserObjectBindings& Ogre::Pass::getUserObjectBindings ( )
inline

Return an instance of user objects binding associated with this class.

You can use it to associate one or more custom objects with this class instance.

See also
UserObjectBindings::setUserAny.

◆ getUserObjectBindings() [2/2]

const UserObjectBindings& Ogre::Pass::getUserObjectBindings ( ) const
inline

Return an instance of user objects binding associated with this class.

You can use it to associate one or more custom objects with this class instance.

See also
UserObjectBindings::setUserAny.

◆ getVertexColourTracking()

TrackVertexColourType Ogre::Pass::getVertexColourTracking ( ) const

Gets which material properties follow the vertex colour.

◆ getVertexProgram()

const GpuProgramPtr& Ogre::Pass::getVertexProgram ( ) const

Gets the vertex program used by this pass, only available after _load().

◆ getVertexProgramName()

const String& Ogre::Pass::getVertexProgramName ( ) const

Gets the name of the vertex program used by this pass.

◆ getVertexProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getVertexProgramParameters ( ) const

Gets the vertex program parameters used by this pass.

◆ hasComputeProgram()

bool Ogre::Pass::hasComputeProgram ( ) const
inline

Returns true if this pass uses a programmable compute pipeline.

◆ hasFragmentProgram()

bool Ogre::Pass::hasFragmentProgram ( ) const
inline

Returns true if this pass uses a programmable fragment pipeline.

◆ hasGeometryProgram()

bool Ogre::Pass::hasGeometryProgram ( ) const
inline

Returns true if this pass uses a programmable geometry pipeline.

◆ hasTessellationDomainProgram()

bool Ogre::Pass::hasTessellationDomainProgram ( ) const
inline

Returns true if this pass uses a programmable tessellation control pipeline.

◆ hasTessellationHullProgram()

bool Ogre::Pass::hasTessellationHullProgram ( ) const
inline

Returns true if this pass uses a programmable tessellation control pipeline.

◆ hasVertexProgram()

bool Ogre::Pass::hasVertexProgram ( ) const
inline

Returns true if this pass uses a programmable vertex pipeline.

◆ isAmbientOnly()

bool Ogre::Pass::isAmbientOnly ( ) const

Returns whether this pass is ambient only.

◆ isLoaded()

bool Ogre::Pass::isLoaded ( ) const

Is this loaded?

◆ isPointAttenuationEnabled()

bool Ogre::Pass::isPointAttenuationEnabled ( ) const

Returns whether points are attenuated with distance.

◆ isProgrammable()

bool Ogre::Pass::isProgrammable ( ) const
inline

Returns true if this pass is programmable i.e. includes either a vertex or fragment program.

◆ isTransparent()

bool Ogre::Pass::isTransparent ( ) const

Returns true if this pass has some element of transparency.

◆ OGRE_DEPRECATED_VER() [1/6]

Ogre::Pass::OGRE_DEPRECATED_VER ( ) const

Returns true if this pass is to override the scene fog settings.

◆ OGRE_DEPRECATED_VER() [2/6]

Ogre::Pass::OGRE_DEPRECATED_VER ( ) const &

Returns the fog colour for the scene.

◆ OGRE_DEPRECATED_VER() [3/6]

Ogre::Pass::OGRE_DEPRECATED_VER ( ) const

Returns the fog mode for this pass.

Note
Only valid if getFogOverride is true.

◆ OGRE_DEPRECATED_VER() [4/6]

Ogre::Pass::OGRE_DEPRECATED_VER ( ) const

Returns the fog density for this pass.

Note
Only valid if getFogOverride is true.

◆ OGRE_DEPRECATED_VER() [5/6]

Ogre::Pass::OGRE_DEPRECATED_VER ( ) const

Returns the fog end distance for this pass.

Note
Only valid if getFogOverride is true.

◆ OGRE_DEPRECATED_VER() [6/6]

Ogre::Pass::OGRE_DEPRECATED_VER ( ) const

Returns the fog start distance for this pass.

Note
Only valid if getFogOverride is true.

◆ OGRE_MUTEX() [1/2]

Ogre::Pass::OGRE_MUTEX ( mGpuProgramChangeMutex  )

◆ OGRE_MUTEX() [2/2]

Ogre::Pass::OGRE_MUTEX ( mTexUnitChangeMutex  )

◆ OGRE_STATIC_MUTEX() [1/2]

Ogre::Pass::OGRE_STATIC_MUTEX ( msDirtyHashListMutex  )

◆ OGRE_STATIC_MUTEX() [2/2]

Ogre::Pass::OGRE_STATIC_MUTEX ( msPassGraveyardMutex  )

◆ operator=()

Pass& Ogre::Pass::operator= ( const Pass oth)

Operator = overload.

◆ removeAllTextureUnitStates()

void Ogre::Pass::removeAllTextureUnitStates ( )

Removes all texture unit settings.

◆ removeTextureUnitState()

void Ogre::Pass::removeTextureUnitState ( unsigned short  index)

Removes the indexed texture unit state from this pass.

Remarks
Note that removing a texture which is not the topmost will have a larger performance impact.

◆ setAlphaRejectFunction()

void Ogre::Pass::setAlphaRejectFunction ( CompareFunction  func)

Sets the alpha reject function.

See setAlphaRejectSettings for more information.

◆ setAlphaRejectValue()

void Ogre::Pass::setAlphaRejectValue ( unsigned char  val)

Gets the alpha reject value.

See setAlphaRejectSettings for more information.

◆ setAmbient() [1/2]

void Ogre::Pass::setAmbient ( const ColourValue ambient)

Sets the ambient colour reflectance properties of this pass.

Remarks
The base colour of a pass is determined by how much red, green and blue light is reflects (provided texture layer #0 has a blend mode other than LBO_REPLACE). This property determines how much ambient light (directionless global light) is reflected. The default is full white, meaning objects are completely globally illuminated. Reduce this if you want to see diffuse or specular light effects, or change the blend of colours to make the object have a base colour other than white.
Note
This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

◆ setAmbient() [2/2]

void Ogre::Pass::setAmbient ( Real  red,
Real  green,
Real  blue 
)

Sets the ambient colour reflectance properties of this pass.

Remarks
The base colour of a pass is determined by how much red, green and blue light is reflects (provided texture layer #0 has a blend mode other than LBO_REPLACE). This property determines how much ambient light (directionless global light) is reflected. The default is full white, meaning objects are completely globally illuminated. Reduce this if you want to see diffuse or specular light effects, or change the blend of colours to make the object have a base colour other than white.
Note
This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

◆ setBlendblock()

void Ogre::Pass::setBlendblock ( const HlmsBlendblock blendblock)

Changes the current blendblock for a new one. Pointer can't be null.

◆ setComputeProgram()

void Ogre::Pass::setComputeProgram ( const String name,
bool  resetParams = true 
)

Sets the details of the compute program to use.

Remarks
Only applicable to programmable passes, this sets the details of the compute program to use in this pass. The program will not be loaded until the parent Material is loaded.
Parameters
nameThe name of the program - this must have been created using GpuProgramManager by the time that this Pass is loaded. If this parameter is blank, any compute program in this pass is disabled.
resetParamsIf true, this will create a fresh set of parameters from the new program being linked, so if you had previously set parameters you will have to set them again. If you set this to false, you must be absolutely sure that the parameters match perfectly, and in the case of named parameters refers to the indexes underlying them, not just the names.

◆ setComputeProgramParameters()

void Ogre::Pass::setComputeProgramParameters ( GpuProgramParametersSharedPtr  params)

Sets the Tessellation Evaluation program parameters.

Remarks
Only applicable to programmable passes.

◆ setDiffuse() [1/2]

void Ogre::Pass::setDiffuse ( const ColourValue diffuse)

Sets the diffuse colour reflectance properties of this pass.

Remarks
The base colour of a pass is determined by how much red, green and blue light is reflects (provided texture layer #0 has a blend mode other than LBO_REPLACE). This property determines how much diffuse light (light from instances of the Light class in the scene) is reflected. The default is full white, meaning objects reflect the maximum white light they can from Light objects.
Note
This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

◆ setDiffuse() [2/2]

void Ogre::Pass::setDiffuse ( Real  red,
Real  green,
Real  blue,
Real  alpha 
)

Sets the diffuse colour reflectance properties of this pass.

Remarks
The base colour of a pass is determined by how much red, green and blue light is reflects (provided texture layer #0 has a blend mode other than LBO_REPLACE). This property determines how much diffuse light (light from instances of the Light class in the scene) is reflected. The default is full white, meaning objects reflect the maximum white light they can from Light objects.
Note
This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

◆ setEmissive() [1/2]

void Ogre::Pass::setEmissive ( const ColourValue emissive)
inline

Sets the amount of self-illumination an object has.

See also
setSelfIllumination

◆ setEmissive() [2/2]

void Ogre::Pass::setEmissive ( Real  red,
Real  green,
Real  blue 
)
inline

Sets the amount of self-illumination an object has.

See also
setSelfIllumination

◆ setFog()

void Ogre::Pass::setFog ( bool  overrideScene,
FogMode  mode = FOG_NONE,
const ColourValue colour = ColourValue::White,
Real  expDensity = Real(0.001),
Real  linearStart = 0.0,
Real  linearEnd = 1.0 
)

Sets the fogging mode applied to this pass.

Remarks
Fogging is an effect that is applied as polys are rendered. Sometimes, you want fog to be applied to an entire scene. Other times, you want it to be applied to a few polygons only. This pass-level specification of fog parameters lets you easily manage both.
The SceneManager class also has a setFog method which applies scene-level fog. This method lets you change the fog behaviour for this pass compared to the standard scene-level fog.
Parameters
overrideSceneIf true, you authorise this pass to override the scene's fog params with it's own settings. If you specify false, so other parameters are necessary, and this is the default behaviour for passes.
modeOnly applicable if overrideScene is true. You can disable fog which is turned on for the rest of the scene by specifying FOG_NONE. Otherwise, set a pass-specific fog mode as defined in the enum FogMode.
colourThe colour of the fog. Either set this to the same as your viewport background colour, or to blend in with a skydome or skybox.
expDensityThe density of the fog in FOG_EXP or FOG_EXP2 mode, as a value between 0 and 1. The default is 0.001.
linearStartDistance in world units at which linear fog starts to encroach. Only applicable if mode is FOG_LINEAR.
linearEndDistance in world units at which linear fog becomes completely opaque. Only applicable if mode is FOG_LINEAR.

◆ setFragmentProgram()

void Ogre::Pass::setFragmentProgram ( const String name,
bool  resetParams = true 
)

Sets the details of the fragment program to use.

Remarks
Only applicable to programmable passes, this sets the details of the fragment program to use in this pass. The program will not be loaded until the parent Material is loaded.
Parameters
nameThe name of the program - this must have been created using GpuProgramManager by the time that this Pass is loaded. If this parameter is blank, any fragment program in this pass is disabled.
resetParamsIf true, this will create a fresh set of parameters from the new program being linked, so if you had previously set parameters you will have to set them again. If you set this to false, you must be absolutely sure that the parameters match perfectly, and in the case of named parameters refers to the indexes underlying them, not just the names.

◆ setFragmentProgramParameters()

void Ogre::Pass::setFragmentProgramParameters ( GpuProgramParametersSharedPtr  params)

Sets the fragment program parameters.

Remarks
Only applicable to programmable passes.

◆ setGeometryProgram()

void Ogre::Pass::setGeometryProgram ( const String name,
bool  resetParams = true 
)

Sets the details of the geometry program to use.

Remarks
Only applicable to programmable passes, this sets the details of the geometry program to use in this pass. The program will not be loaded until the parent Material is loaded.
Parameters
nameThe name of the program - this must have been created using GpuProgramManager by the time that this Pass is loaded. If this parameter is blank, any geometry program in this pass is disabled.
resetParamsIf true, this will create a fresh set of parameters from the new program being linked, so if you had previously set parameters you will have to set them again. If you set this to false, you must be absolutely sure that the parameters match perfectly, and in the case of named parameters refers to the indexes underlying them, not just the names.

◆ setGeometryProgramParameters()

void Ogre::Pass::setGeometryProgramParameters ( GpuProgramParametersSharedPtr  params)

Sets the geometry program parameters.

Remarks
Only applicable to programmable passes.

◆ setIteratePerLight()

void Ogre::Pass::setIteratePerLight ( bool  enabled,
bool  onlyForOneLightType = true,
Light::LightTypes  lightType = Light::LT_POINT 
)

Sets whether or not this pass should iterate per light or number of lights which can affect the object being rendered.

Remarks
The default behaviour for a pass (when this option is 'false'), is for a pass to be rendered only once (or the number of times set in setPassIterationCount), with all the lights which could affect this object set at the same time (up to the maximum lights allowed in the render system, which is typically 8).
Setting this option to 'true' changes this behaviour, such that instead of trying to issue render this pass once per object, it is run per light, or for a group of 'n' lights each time which can affect this object, the number of times set in setPassIterationCount (default is once). In this case, only light index 0 is ever used, and is a different light every time the pass is issued, up to the total number of lights which is affecting this object. This has 2 advantages:
  • There is no limit on the number of lights which can be supported
  • It's easier to write vertex / fragment programs for this because a single program can be used for any number of lights
However, this technique is more expensive, and typically you will want an additional ambient pass, because if no lights are affecting the object it will not be rendered at all, which will look odd even if ambient light is zero (imagine if there are lit objects behind it - the objects silhouette would not show up). Therefore, use this option with care, and you would be well advised to provide a less expensive fallback technique for use in the distance.
Note
The number of times this pass runs is still limited by the maximum number of lights allowed as set in setMaxSimultaneousLights, so you will never get more passes than this. Also, the iteration is started from the 'start light' as set in Pass::setStartLight, and the number of passes is the number of lights to iterate over divided by the number of lights per iteration (default 1, set by setLightCountPerIteration).
Parameters
enabledWhether this feature is enabled
onlyForOneLightTypeIf true, the pass will only be run for a single type of light, other light types will be ignored.
lightTypeThe single light type which will be considered for this pass

◆ setLightClipPlanesEnabled()

void Ogre::Pass::setLightClipPlanesEnabled ( bool  enabled)
inline

Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the light.

Remarks
In order to cut down on the geometry set up to render this pass when you have a single fixed-range light being rendered through it, you can enable this option to request that during triangle setup, clip planes are defined to bound the range of the light. In the case of a point light these planes form a cube, and in the case of a spotlight they form a pyramid. Directional lights are never clipped.
This option is only likely to be useful for multipass additive lighting algorithms, where the scene has already been 'seeded' with an ambient pass and this pass is just adding light in affected areas. In addition, it will only be honoured if there is exactly one non-directional light being used in this pass. Also, these clip planes override any user clip planes set on Camera.
Note
When using SHADOWTYPE_STENCIL_ADDITIVE or SHADOWTYPE_TEXTURE_ADDITIVE, this option is automatically used for all per-light passes if you enable SceneManager::setShadowUseLightClipPlanes and does not need to be specified. It is disabled by default since clip planes have a cost of their own which may not always exceed the benefits they give you.

◆ setLightCountPerIteration()

void Ogre::Pass::setLightCountPerIteration ( unsigned short  c)

If light iteration is enabled, determine the number of lights per iteration.

Remarks
The default for this setting is 1, so if you enable light iteration (Pass::setIteratePerLight), the pass is rendered once per light. If you set this value higher, the passes will occur once per 'n' lights. The start of the iteration is set by Pass::setStartLight and the end by Pass::setMaxSimultaneousLights.

◆ setLightMask()

void Ogre::Pass::setLightMask ( uint32  mask)

Sets the light mask which can be matched to specific light flags to be handled by this pass.

◆ setLightScissoringEnabled()

void Ogre::Pass::setLightScissoringEnabled ( bool  enabled)
inline

Sets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are being used in it.

Remarks
In order to cut down on fillrate when you have a number of fixed-range lights in the scene, you can enable this option to request that during rendering, only the region of the screen which is covered by the lights is rendered. This region is the screen-space rectangle covering the union of the spheres making up the light ranges. Directional lights are ignored for this.
This is only likely to be useful for multipass additive lighting algorithms, where the scene has already been 'seeded' with an ambient pass and this pass is just adding light in affected areas.
Note
When using SHADOWTYPE_STENCIL_ADDITIVE or SHADOWTYPE_TEXTURE_ADDITIVE, this option is implicitly used for all per-light passes and does not need to be specified. If you are not using shadows or are using a modulative or an integrated shadow technique then this could be useful.

◆ setMacroblock()

void Ogre::Pass::setMacroblock ( const HlmsMacroblock macroblock)

Changes the current macroblock for a new one. Pointer can't be null.

◆ setMaxSimultaneousLights()

void Ogre::Pass::setMaxSimultaneousLights ( unsigned short  maxLights)

Sets the maximum number of lights to be used by this pass.

Remarks
During rendering, if lighting is enabled (or if the pass uses an automatic program parameter based on a light) the engine will request the nearest lights to the object being rendered in order to work out which ones to use. This parameter sets the limit on the number of lights which should apply to objects rendered with this pass.

◆ setName()

void Ogre::Pass::setName ( const String name)

◆ setPassIterationCount()

void Ogre::Pass::setPassIterationCount ( const size_t  count)
inline

set the number of iterations that this pass should perform when doing fast multi pass operation.

Remarks
Only applicable for programmable passes.
Parameters
countnumber of iterations to perform fast multi pass operations. A value greater than 1 will cause the pass to be executed count number of times without changing the render state. This is very useful for passes that use programmable shaders that have to iterate more than once but don't need a render state change. Using multi pass can dramatically speed up rendering for materials that do things like fur, blur. A value of 1 turns off multi pass operation and the pass does the normal pass operation.

◆ setPointAttenuation()

void Ogre::Pass::setPointAttenuation ( bool  enabled,
Real  constant = 0.0f,
Real  linear = 1.0f,
Real  quadratic = 0.0f 
)

Sets how points are attenuated with distance.

Remarks
When performing point rendering or point sprite rendering, point size can be attenuated with distance. The equation for doing this is attenuation = 1 / (constant + linear * dist + quadratic * d^2).
For example, to disable distance attenuation (constant screensize) you would set constant to 1, and linear and quadratic to 0. A standard perspective attenuation would be 0, 1, 0 respectively.
Note
The resulting size is clamped to the minimum and maximum point size.
Parameters
enabledWhether point attenuation is enabled
constant,linear,quadraticParameters to the attenuation function defined above

◆ setPointMaxSize()

void Ogre::Pass::setPointMaxSize ( Real  max)

Set the maximum point size, when point attenuation is in use.

Remarks
Setting this to 0 indicates the max size supported by the card.

◆ setPointMinSize()

void Ogre::Pass::setPointMinSize ( Real  min)

Set the minimum point size, when point attenuation is in use.

◆ setPointSize()

void Ogre::Pass::setPointSize ( Real  ps)

Sets the point size of this pass.

Remarks
This setting allows you to change the size of points when rendering a point list, or a list of point sprites. The interpretation of this command depends on the Pass::setPointSizeAttenuation option - if it is off (the default), the point size is in screen pixels, if it is on, it expressed as normalised screen coordinates (1.0 is the height of the screen) when the point is at the origin.
Note
Some drivers have an upper limit on the size of points they support
  • this can even vary between APIs on the same card! Don't rely on point sizes that cause the point sprites to get very large on screen, since they may get clamped on some cards. Upper sizes can range from 64 to 256 pixels.

◆ setPointSpritesEnabled()

void Ogre::Pass::setPointSpritesEnabled ( bool  enabled)

Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) or plain points (dots).

Parameters
enabledTrue enables point sprites, false returns to normal point rendering.

◆ setPolygonModeOverrideable()

virtual void Ogre::Pass::setPolygonModeOverrideable ( bool  override)
inlinevirtual

Sets whether this pass's chosen detail level can be overridden (downgraded) by the camera setting.

Parameters
overridetrue means that a lower camera detail will override this pass's detail level, false means it won't (default true).

◆ setSamplerblock()

void Ogre::Pass::setSamplerblock ( const HlmsSamplerblock samplerblock)

Set samplerblock for every texture unit.

Note
This property actually exists on the TextureUnitState class For simplicity, this method allows you to set these properties for every current TeextureUnitState, If you need more precision, retrieve the TextureUnitState instance and set the property there.
See also
TextureUnitState::setSamplerblock

◆ setSelfIllumination() [1/2]

void Ogre::Pass::setSelfIllumination ( const ColourValue selfIllum)

Sets the amount of self-illumination an object has.

Remarks
If an object is self-illuminating, it does not need external sources to light it, ambient or otherwise. It's like the object has it's own personal ambient light. This property is rarely useful since you can already specify per-pass ambient light, but is here for completeness.
Note
This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

◆ setSelfIllumination() [2/2]

void Ogre::Pass::setSelfIllumination ( Real  red,
Real  green,
Real  blue 
)

Sets the amount of self-illumination an object has.

Remarks
If an object is self-illuminating, it does not need external sources to light it, ambient or otherwise. It's like the object has it's own personal ambient light. This property is rarely useful since you can already specify per-pass ambient light, but is here for completeness.
Note
This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

◆ setShadingMode()

void Ogre::Pass::setShadingMode ( ShadeOptions  mode)

Sets the type of light shading required.

Note
The default shading method is Gouraud shading.

◆ setShininess()

void Ogre::Pass::setShininess ( Real  val)

Sets the shininess of the pass, affecting the size of specular highlights.

Note
This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

◆ setSpecular() [1/2]

void Ogre::Pass::setSpecular ( const ColourValue specular)

Sets the specular colour reflectance properties of this pass.

Remarks
The base colour of a pass is determined by how much red, green and blue light is reflects (provided texture layer #0 has a blend mode other than LBO_REPLACE). This property determines how much specular light (highlights from instances of the Light class in the scene) is reflected. The default is to reflect no specular light.
Note
The size of the specular highlights is determined by the separate 'shininess' property.
This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

◆ setSpecular() [2/2]

void Ogre::Pass::setSpecular ( Real  red,
Real  green,
Real  blue,
Real  alpha 
)

Sets the specular colour reflectance properties of this pass.

Remarks
The base colour of a pass is determined by how much red, green and blue light is reflects (provided texture layer #0 has a blend mode other than LBO_REPLACE). This property determines how much specular light (highlights from instances of the Light class in the scene) is reflected. The default is to reflect no specular light.
Note
The size of the specular highlights is determined by the separate 'shininess' property.
This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

◆ setStartLight()

void Ogre::Pass::setStartLight ( unsigned short  startLight)

Sets the light index that this pass will start at in the light list.

Remarks
Normally the lights passed to a pass will start from the beginning of the light list for this object. This option allows you to make this pass start from a higher light index, for example if one of your earlier passes could deal with lights 0-3, and this pass dealt with lights 4+. This option also has an interaction with pass iteration, in that if you choose to iterate this pass per light too, the iteration will only begin from light 4.

◆ setTessellationDomainProgram()

void Ogre::Pass::setTessellationDomainProgram ( const String name,
bool  resetParams = true 
)

Sets the details of the Tessellation domain program to use.

Remarks
Only applicable to programmable passes, this sets the details of the Tessellation domain program to use in this pass. The program will not be loaded until the parent Material is loaded.
Parameters
nameThe name of the program - this must have been created using GpuProgramManager by the time that this Pass is loaded. If this parameter is blank, any Tessellation domain program in this pass is disabled.
resetParamsIf true, this will create a fresh set of parameters from the new program being linked, so if you had previously set parameters you will have to set them again. If you set this to false, you must be absolutely sure that the parameters match perfectly, and in the case of named parameters refers to the indexes underlying them, not just the names.

◆ setTessellationDomainProgramParameters()

void Ogre::Pass::setTessellationDomainProgramParameters ( GpuProgramParametersSharedPtr  params)

Sets the Tessellation Domain program parameters.

Remarks
Only applicable to programmable passes.

◆ setTessellationHullProgram()

void Ogre::Pass::setTessellationHullProgram ( const String name,
bool  resetParams = true 
)

Support for shader model 5.0, hull and domain shaders.

Sets the details of the Tessellation control program to use.

Remarks
Only applicable to programmable passes, this sets the details of the Tessellation Hull program to use in this pass. The program will not be loaded until the parent Material is loaded.
Parameters
nameThe name of the program - this must have been created using GpuProgramManager by the time that this Pass is loaded. If this parameter is blank, any Tessellation Hull program in this pass is disabled.
resetParamsIf true, this will create a fresh set of parameters from the new program being linked, so if you had previously set parameters you will have to set them again. If you set this to false, you must be absolutely sure that the parameters match perfectly, and in the case of named parameters refers to the indexes underlying them, not just the names.

◆ setTessellationHullProgramParameters()

void Ogre::Pass::setTessellationHullProgramParameters ( GpuProgramParametersSharedPtr  params)

Sets the Tessellation Hull program parameters.

Remarks
Only applicable to programmable passes.

◆ setVertexColourTracking()

void Ogre::Pass::setVertexColourTracking ( TrackVertexColourType  tracking)

Sets which material properties follow the vertex colour.

◆ setVertexProgram()

void Ogre::Pass::setVertexProgram ( const String name,
bool  resetParams = true 
)

Sets the details of the vertex program to use.

Remarks
Only applicable to programmable passes, this sets the details of the vertex program to use in this pass. The program will not be loaded until the parent Material is loaded.
Parameters
nameThe name of the program - this must have been created using GpuProgramManager by the time that this Pass is loaded. If this parameter is blank, any vertex program in this pass is disabled.
resetParamsIf true, this will create a fresh set of parameters from the new program being linked, so if you had previously set parameters you will have to set them again. If you set this to false, you must be absolutely sure that the parameters match perfectly, and in the case of named parameters refers to the indexes underlying them, not just the names.

◆ setVertexProgramParameters()

void Ogre::Pass::setVertexProgramParameters ( GpuProgramParametersSharedPtr  params)

Sets the vertex program parameters.

Remarks
Only applicable to programmable passes, and this particular call is designed for low-level programs; use the named parameter methods for setting high-level program parameters.

The documentation for this class was generated from the following file: