# OgreBlendMode.h File Reference

`#include "OgrePrerequisites.h"`
`#include "OgreColourValue.h"`

Go to the source code of this file.

## Namespaces

namespace | Ogre

## Enumerations

enum | LayerBlendType { LBT_COLOUR, LBT_ALPHA }
| Type of texture blend mode. More...
enum | LayerBlendOperation { LBO_REPLACE, LBO_ADD, LBO_MODULATE, LBO_ALPHA_BLEND }
| List of valid texture blending operations, for use with TextureUnitState::setColourOperation. More...
enum | LayerBlendOperationEx { LBX_SOURCE1, LBX_SOURCE2, LBX_MODULATE, LBX_MODULATE_X2, LBX_MODULATE_X4, LBX_ADD, LBX_ADD_SIGNED, LBX_ADD_SMOOTH, LBX_SUBTRACT, LBX_BLEND_DIFFUSE_ALPHA, LBX_BLEND_TEXTURE_ALPHA, LBX_BLEND_CURRENT_ALPHA, LBX_BLEND_MANUAL, LBX_DOTPRODUCT, LBX_BLEND_DIFFUSE_COLOUR }
| Expert list of valid texture blending operations, for use with TextureUnitState::setColourOperationEx and TextureUnitState::setAlphaOperation, and internally in the LayerBlendModeEx class. More...
enum | LayerBlendSource { LBS_CURRENT, LBS_TEXTURE, LBS_DIFFUSE, LBS_SPECULAR, LBS_MANUAL }
| List of valid sources of values for blending operations used in TextureUnitState::setColourOperation and TextureUnitState::setAlphaOperation, and internally in the LayerBlendModeEx class. More...
enum | SceneBlendType { SBT_TRANSPARENT_ALPHA, SBT_TRANSPARENT_COLOUR, SBT_ADD, SBT_MODULATE, SBT_REPLACE }
| Types of blending that you can specify between an object and the existing contents of the scene. More...
enum | SceneBlendFactor { SBF_ONE, SBF_ZERO, SBF_DEST_COLOUR, SBF_SOURCE_COLOUR, SBF_ONE_MINUS_DEST_COLOUR, SBF_ONE_MINUS_SOURCE_COLOUR, SBF_DEST_ALPHA, SBF_SOURCE_ALPHA, SBF_ONE_MINUS_DEST_ALPHA, SBF_ONE_MINUS_SOURCE_ALPHA }
| Blending factors for manually blending objects with the scene. More...

## Enumeration Type Documentation

enum Ogre::LayerBlendOperation

List of valid texture blending operations, for use with TextureUnitState::setColourOperation.

Remarks:
  This list is a more limited list than LayerBlendOperationEx because it only includes operations that are supportable in both multipass and multitexture rendering and thus provides automatic fallback if multitexture hardware is lacking or insufficient.

Enumeration values:

  LBO_REPLACE | Replace all colour with texture with no adjustment.
  LBO_ADD | Add colour components together.
  LBO_MODULATE | Multiply colour components together.
  LBO_ALPHA_BLEND | Blend based on texture alpha.

Definition at line 48 of file OgreBlendMode.h.

enum Ogre::LayerBlendOperationEx

Expert list of valid texture blending operations, for use with TextureUnitState::setColourOperationEx and TextureUnitState::setAlphaOperation, and internally in the LayerBlendModeEx class.

It's worth noting that these operations are for blending between texture layers and not between rendered objects and the existing scene. Because all of these modes are only supported in multitexture hardware it may be required to set up a fallback operation where this hardware is not available.

Enumeration values:

  LBX_SOURCE1 | use source1 without modification
  LBX_SOURCE2 | use source2 without modification
  LBX_MODULATE | multiply source1 and source2 together
  LBX_MODULATE_X2 | as LBX_MODULATE but brighten afterwards (x2)
  LBX_MODULATE_X4 | as LBX_MODULATE but brighten more afterwards (x4)
  LBX_ADD | add source1 and source2 together
  LBX_ADD_SIGNED | as LBX_ADD, but subtract 0.5 from the result
  LBX_ADD_SMOOTH | as LBX_ADD, but subtract product from the sum
  LBX_SUBTRACT | subtract source2 from source1
  LBX_BLEND_DIFFUSE_ALPHA | use interpolated alpha value from vertices to scale source1, then add source2 scaled by (1-alpha)
  LBX_BLEND_TEXTURE_ALPHA | as LBX_BLEND_DIFFUSE_ALPHA, but use alpha from texture
  LBX_BLEND_CURRENT_ALPHA | as LBX_BLEND_DIFFUSE_ALPHA, but use current alpha from previous stages
  LBX_BLEND_MANUAL | as LBX_BLEND_DIFFUSE_ALPHA but use a constant manual blend value (0.0-1.0)
  LBX_DOTPRODUCT | dotproduct of color1 and color2
  LBX_BLEND_DIFFUSE_COLOUR | use interpolated color values from vertices to scale source1, then add source2 scaled by (1-color)

Definition at line 66 of file OgreBlendMode.h.

enum Ogre::LayerBlendSource

List of valid sources of values for blending operations used in TextureUnitState::setColourOperation and TextureUnitState::setAlphaOperation, and internally in the LayerBlendModeEx class.

Enumeration values:

  LBS_CURRENT | the colour as built up from previous stages
  LBS_TEXTURE | the colour derived from the texture assigned to this layer
  LBS_DIFFUSE | the interpolated diffuse colour from the vertices
  LBS_SPECULAR | the interpolated specular colour from the vertices
  LBS_MANUAL | a colour supplied manually as a separate argument

Definition at line 103 of file OgreBlendMode.h.

enum Ogre::LayerBlendType

Type of texture blend mode.

Enumeration values:

  LBT_COLOUR |
  LBT_ALPHA |

Definition at line 35 of file OgreBlendMode.h.

enum Ogre::SceneBlendFactor

Blending factors for manually blending objects with the scene.

If there isn't a predefined SceneBlendType that you like, then you can specify the blending factors directly to affect the combination of object and the existing scene. See Material::setSceneBlending for more details.

Enumeration values:

  SBF_ONE |
  SBF_ZERO |
  SBF_DEST_COLOUR |
  SBF_SOURCE_COLOUR |
  SBF_ONE_MINUS_DEST_COLOUR |
  SBF_ONE_MINUS_SOURCE_COLOUR |
  SBF_DEST_ALPHA |
  SBF_SOURCE_ALPHA |
  SBF_ONE_MINUS_DEST_ALPHA |
  SBF_ONE_MINUS_SOURCE_ALPHA |

Definition at line 225 of file OgreBlendMode.h.

enum Ogre::SceneBlendType

Types of blending that you can specify between an object and the existing contents of the scene.

Remarks:
  As opposed to the LayerBlendType, which classifies blends between texture layers, these blending types blend between the output of the texture units and the pixels already in the viewport, allowing for object transparency, glows, etc.

  These types are provided to give quick and easy access to common effects. You can also use the more manual method of supplying source and destination blending factors. See Material::setSceneBlending for more details.

See also:
  Material::setSceneBlending

Enumeration values:

  SBT_TRANSPARENT_ALPHA | Make the object transparent based on the final alpha values in the texture.
  SBT_TRANSPARENT_COLOUR | Make the object transparent based on the colour values in the texture (brighter = more opaque).
  SBT_ADD | Add the texture values to the existing scene content.
  SBT_MODULATE | Multiply the 2 colours together.
  SBT_REPLACE | The default blend mode where source replaces destination.

Definition at line 206 of file OgreBlendMode.h.

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Sep 17 15:39:13 2006