OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
Ogre::RTShader::LayeredBlending Class Reference

Texturing sub render state implementation of layered blending. More...

#include <OgreShaderExLayeredBlending.h>

+ Inheritance diagram for Ogre::RTShader::LayeredBlending:

Classes

struct  TextureBlend
 

Public Types

enum  BlendMode {
  LB_Invalid = -1 , LB_FFPBlend , LB_BlendNormal , LB_BlendLighten ,
  LB_BlendDarken , LB_BlendMultiply , LB_BlendAverage , LB_BlendAdd ,
  LB_BlendSubtract , LB_BlendDifference , LB_BlendNegation , LB_BlendExclusion ,
  LB_BlendScreen , LB_BlendOverlay , LB_BlendSoftLight , LB_BlendHardLight ,
  LB_BlendColorDodge , LB_BlendColorBurn , LB_BlendLinearDodge , LB_BlendLinearBurn ,
  LB_BlendLinearLight , LB_BlendVividLight , LB_BlendPinLight , LB_BlendHardMix ,
  LB_BlendReflect , LB_BlendGlow , LB_BlendPhoenix , LB_BlendSaturation ,
  LB_BlendColor , LB_BlendLuminosity , LB_MaxBlendModes
}
 
enum  SourceModifier {
  SM_Invalid = -1 , SM_None , SM_Source1Modulate , SM_Source2Modulate ,
  SM_Source1InvModulate , SM_Source2InvModulate , SM_MaxSourceModifiers
}
 

Public Member Functions

 LayeredBlending ()
 Class default constructor. More...
 
virtual void copyFrom (const SubRenderState &rhs)
 
virtual bool createCpuSubPrograms (ProgramSet *programSet)
 Create sub programs that represents this sub render state as part of a program set. More...
 
SubRenderStateAccessorPtr getAccessor ()
 Return the accessor object to this sub render state. More...
 
SubRenderStateAccessorPtr getAccessor () const
 Return the accessor object to this sub render state. More...
 
BlendMode getBlendMode (unsigned short index) const
 Return the blend mode of the given texture unit index. More...
 
virtual int getExecutionOrder () const
 
bool getSourceModifier (unsigned short index, SourceModifier &modType, int &customNum) const
 Returns the source modifier parameters for a given texture unit. More...
 
virtual const Ogre::StringgetType () const
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
virtual bool preAddToRenderState (const RenderState *renderState, Pass *srcPass, Pass *dstPass)
 
void setBlendMode (unsigned short index, BlendMode mode)
 Set the blend mode of the given texture unit layer with the previous layer. More...
 
void setSourceModifier (unsigned short index, SourceModifier modType, int customNum)
 Set the source modifier parameters for a given texture unit. More...
 
virtual void updateGpuProgramsParams (Renderable *rend, Pass *pass, const AutoParamDataSource *source, const LightList *pLightList)
 

Static Public Member Functions

static void AddTextureSampleWrapperInvocation (UniformParameterPtr textureSampler, UniformParameterPtr textureSamplerState, GpuConstantType samplerType, Function *function, int groupOrder, int &internalCounter)
 
static ParameterPtr GetSamplerWrapperParam (UniformParameterPtr sampler, Function *function)
 

Static Public Attributes

static String Type
 

Detailed Description

Texturing sub render state implementation of layered blending.

Derives from FFPTexturing class which derives from SubRenderState class.

Member Enumeration Documentation

◆ BlendMode

Enumerator
LB_Invalid 
LB_FFPBlend 
LB_BlendNormal 
LB_BlendLighten 
LB_BlendDarken 
LB_BlendMultiply 
LB_BlendAverage 
LB_BlendAdd 
LB_BlendSubtract 
LB_BlendDifference 
LB_BlendNegation 
LB_BlendExclusion 
LB_BlendScreen 
LB_BlendOverlay 
LB_BlendSoftLight 
LB_BlendHardLight 
LB_BlendColorDodge 
LB_BlendColorBurn 
LB_BlendLinearDodge 
LB_BlendLinearBurn 
LB_BlendLinearLight 
LB_BlendVividLight 
LB_BlendPinLight 
LB_BlendHardMix 
LB_BlendReflect 
LB_BlendGlow 
LB_BlendPhoenix 
LB_BlendSaturation 
LB_BlendColor 
LB_BlendLuminosity 
LB_MaxBlendModes 

◆ SourceModifier

Enumerator
SM_Invalid 
SM_None 
SM_Source1Modulate 
SM_Source2Modulate 
SM_Source1InvModulate 
SM_Source2InvModulate 
SM_MaxSourceModifiers 

Constructor & Destructor Documentation

◆ LayeredBlending()

Ogre::RTShader::LayeredBlending::LayeredBlending ( )

Class default constructor.

Member Function Documentation

◆ AddTextureSampleWrapperInvocation()

static void Ogre::RTShader::FFPTexturing::AddTextureSampleWrapperInvocation ( UniformParameterPtr  textureSampler,
UniformParameterPtr  textureSamplerState,
GpuConstantType  samplerType,
Function function,
int  groupOrder,
int &  internalCounter 
)
staticinherited

◆ copyFrom()

virtual void Ogre::RTShader::LayeredBlending::copyFrom ( const SubRenderState rhs)
virtual

◆ createCpuSubPrograms()

virtual bool Ogre::RTShader::SubRenderState::createCpuSubPrograms ( ProgramSet programSet)
virtualinherited

Create sub programs that represents this sub render state as part of a program set.

The given program set contains CPU programs that represents a vertex shader and pixel shader. One should use these program class API to create a representation of the sub state he wished to implement.

Parameters
programSetcontainer class of CPU and GPU programs that this sub state will affect on.

Reimplemented in Ogre::RTShader::FFPTransform.

◆ getAccessor() [1/2]

SubRenderStateAccessorPtr Ogre::RTShader::SubRenderState::getAccessor ( )
inherited

Return the accessor object to this sub render state.

See also
SubRenderStateAccessor.

◆ getAccessor() [2/2]

SubRenderStateAccessorPtr Ogre::RTShader::SubRenderState::getAccessor ( ) const
inherited

Return the accessor object to this sub render state.

See also
SubRenderStateAccessor.

◆ getBlendMode()

BlendMode Ogre::RTShader::LayeredBlending::getBlendMode ( unsigned short  index) const

Return the blend mode of the given texture unit index.

◆ getExecutionOrder()

virtual int Ogre::RTShader::FFPTexturing::getExecutionOrder ( ) const
virtualinherited

◆ GetSamplerWrapperParam()

static ParameterPtr Ogre::RTShader::FFPTexturing::GetSamplerWrapperParam ( UniformParameterPtr  sampler,
Function function 
)
staticinherited

◆ getSourceModifier()

bool Ogre::RTShader::LayeredBlending::getSourceModifier ( unsigned short  index,
SourceModifier modType,
int &  customNum 
) const

Returns the source modifier parameters for a given texture unit.

Returns
True if a valid modifier exist for the given texture unit
Parameters
indexTexture blend index
modTypeThe source modification type to use
customNumThe custom parameter number used to control the modification

◆ getType()

virtual const Ogre::String& Ogre::RTShader::LayeredBlending::getType ( ) const
virtual

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

◆ operator delete[]() [1/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

◆ operator delete[]() [2/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [2/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [3/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

◆ operator new[]() [1/2]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

◆ operator new[]() [2/2]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

◆ preAddToRenderState()

virtual bool Ogre::RTShader::FFPTexturing::preAddToRenderState ( const RenderState renderState,
Pass srcPass,
Pass dstPass 
)
virtualinherited

◆ setBlendMode()

void Ogre::RTShader::LayeredBlending::setBlendMode ( unsigned short  index,
BlendMode  mode 
)

Set the blend mode of the given texture unit layer with the previous layer.

Parameters
indexThe texture unit texture. Textures units (index-1) and (index) will be blended.
modeThe blend mode to apply.

◆ setSourceModifier()

void Ogre::RTShader::LayeredBlending::setSourceModifier ( unsigned short  index,
SourceModifier  modType,
int  customNum 
)

Set the source modifier parameters for a given texture unit.

Parameters
modTypeThe source modification type to use
customNumThe custom parameter number used to control the modification

◆ updateGpuProgramsParams()

virtual void Ogre::RTShader::FFPTexturing::updateGpuProgramsParams ( Renderable rend,
Pass pass,
const AutoParamDataSource source,
const LightList pLightList 
)
virtualinherited

Member Data Documentation

◆ Type

String Ogre::RTShader::LayeredBlending::Type
static

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