OGRE 14.3
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Materials

Classes

class  Ogre::AutoParamDataSource
 This utility class is used to hold the information used to generate the matrices and other information required to automatically populate GpuProgramParameters. More...
 
struct  Ogre::ColourBlendState
 Describes the global blending factors for combining subsequent renders with the existing frame contents. More...
 
class  Ogre::ExternalTextureSource
 IMPORTANT: Plugins must override default dictionary name! Base class that texture plugins derive from. More...
 
class  Ogre::ExternalTextureSourceManager
 Singleton Class which handles the registering and control of texture plugins. More...
 
struct  Ogre::GpuConstantDefinition
 Information about predefined program constants. More...
 
struct  Ogre::GpuLogicalBufferStruct
 Container struct to allow params to safely & update shared list of logical buffer assignments. More...
 
struct  Ogre::GpuLogicalIndexUse
 Structure recording the use of a physical buffer by a logical parameter index. More...
 
struct  Ogre::GpuNamedConstants
 Struct collecting together the information for named constants. More...
 
class  Ogre::GpuNamedConstantsSerializer
 Simple class for loading / saving GpuNamedConstants. More...
 
class  Ogre::GpuProgramParameters
 Collects together the program parameters used for a GpuProgram. More...
 
class  Ogre::GpuProgramUsage
 This class makes the usage of a vertex and fragment programs (low-level or high-level), with a given set of parameters, explicit. More...
 
class  Ogre::GpuSharedParameters
 A group of manually updated parameters that are shared between many parameter sets. More...
 
class  Ogre::GpuSharedParametersUsage
 This class records the usage of a set of shared parameters in a concrete set of GpuProgramParameters. More...
 
struct  Ogre::IlluminationPass
 Struct recording a pass which can be used for a specific illumination stage. More...
 
class  Ogre::LayerBlendModeEx
 Class which manages blending of both colour and alpha components. More...
 
class  Ogre::Material
 Class encapsulates rendering properties of an object. More...
 
class  Ogre::MaterialManager
 Class for managing Material settings for Ogre. More...
 
class  Ogre::MaterialSerializer
 Class for serializing Materials to a .material script. More...
 
class  Ogre::Pass
 Class defining a single pass of a Technique (of a Material): a single rendering call. More...
 
class  Ogre::Sampler
 Class which determines how a TextureUnitState accesses data from a Texture. More...
 
class  Ogre::Technique
 Class representing an approach to rendering this particular Material. More...
 
class  Ogre::TextureUnitState
 Class representing the state of a single texture unit during a Pass of a Technique, of a Material. More...
 

Typedefs

typedef std::vector< ucharOgre::ConstantList
 Definition of container that holds the current constants.
 
typedef ConstMapIterator< GpuConstantDefinitionMapOgre::GpuConstantDefinitionIterator
 
typedef std::map< String, GpuConstantDefinitionOgre::GpuConstantDefinitionMap
 
typedef std::map< size_t, GpuLogicalIndexUseOgre::GpuLogicalIndexUseMap
 
typedef std::vector< IlluminationPass * > Ogre::IlluminationPassList
 
typedef std::shared_ptr< SamplerOgre::SamplerPtr
 

Enumerations

enum  Ogre::BaseConstantType {
  Ogre::BCT_FLOAT = 0 , Ogre::BCT_INT = 0x10 , Ogre::BCT_DOUBLE = 0x20 , Ogre::BCT_UINT = 0x30 ,
  Ogre::BCT_BOOL = 0x40 , Ogre::BCT_SAMPLER = 0x50 , Ogre::BCT_SPECIALIZATION = 0x60 , Ogre::BCT_UNKNOWN = 0x70
}
 
enum  Ogre::eTexturePlayMode { Ogre::TextureEffectPause = 0 , Ogre::TextureEffectPlay_ASAP = 1 , Ogre::TextureEffectPlay_Looping = 2 }
 Enum for type of texture play mode. More...
 
enum  Ogre::GpuConstantType {
  Ogre::GCT_FLOAT1 = BCT_FLOAT + 1 , Ogre::GCT_FLOAT2 = BCT_FLOAT + 2 , Ogre::GCT_FLOAT3 = BCT_FLOAT + 3 , Ogre::GCT_FLOAT4 = BCT_FLOAT + 4 ,
  Ogre::GCT_SAMPLER1D = BCT_SAMPLER + 1 , Ogre::GCT_SAMPLER2D = BCT_SAMPLER + 2 , Ogre::GCT_SAMPLER3D = BCT_SAMPLER + 3 , Ogre::GCT_SAMPLERCUBE = BCT_SAMPLER + 4 ,
  Ogre::GCT_SAMPLER1DSHADOW = BCT_SAMPLER + 6 , Ogre::GCT_SAMPLER2DSHADOW = BCT_SAMPLER + 7 , Ogre::GCT_SAMPLER2DARRAY = BCT_SAMPLER + 8 , Ogre::GCT_SAMPLER_EXTERNAL_OES = BCT_SAMPLER + 9 ,
  Ogre::GCT_MATRIX_2X2 = BCT_FLOAT + 5 , Ogre::GCT_MATRIX_2X3 = BCT_FLOAT + 6 , Ogre::GCT_MATRIX_2X4 = BCT_FLOAT + 7 , Ogre::GCT_MATRIX_3X2 = BCT_FLOAT + 8 ,
  Ogre::GCT_MATRIX_3X3 = BCT_FLOAT + 9 , Ogre::GCT_MATRIX_3X4 = BCT_FLOAT + 10 , Ogre::GCT_MATRIX_4X2 = BCT_FLOAT + 11 , Ogre::GCT_MATRIX_4X3 = BCT_FLOAT + 12 ,
  Ogre::GCT_MATRIX_4X4 = BCT_FLOAT + 13 , Ogre::GCT_INT1 = BCT_INT + 1 , Ogre::GCT_INT2 = BCT_INT + 2 , Ogre::GCT_INT3 = BCT_INT + 3 ,
  Ogre::GCT_INT4 = BCT_INT + 4 , Ogre::GCT_SPECIALIZATION = BCT_SPECIALIZATION , Ogre::GCT_DOUBLE1 = BCT_DOUBLE + 1 , Ogre::GCT_DOUBLE2 = BCT_DOUBLE + 2 ,
  Ogre::GCT_DOUBLE3 = BCT_DOUBLE + 3 , Ogre::GCT_DOUBLE4 = BCT_DOUBLE + 4 , Ogre::GCT_MATRIX_DOUBLE_2X2 = BCT_DOUBLE + 5 , Ogre::GCT_MATRIX_DOUBLE_2X3 = BCT_DOUBLE + 6 ,
  Ogre::GCT_MATRIX_DOUBLE_2X4 = BCT_DOUBLE + 7 , Ogre::GCT_MATRIX_DOUBLE_3X2 = BCT_DOUBLE + 8 , Ogre::GCT_MATRIX_DOUBLE_3X3 = BCT_DOUBLE + 9 , Ogre::GCT_MATRIX_DOUBLE_3X4 = BCT_DOUBLE + 10 ,
  Ogre::GCT_MATRIX_DOUBLE_4X2 = BCT_DOUBLE + 11 , Ogre::GCT_MATRIX_DOUBLE_4X3 = BCT_DOUBLE + 12 , Ogre::GCT_MATRIX_DOUBLE_4X4 = BCT_DOUBLE + 13 , Ogre::GCT_UINT1 = BCT_UINT + 1 ,
  Ogre::GCT_UINT2 = BCT_UINT + 2 , Ogre::GCT_UINT3 = BCT_UINT + 3 , Ogre::GCT_UINT4 = BCT_UINT + 4 , Ogre::GCT_BOOL1 = BCT_BOOL + 1 ,
  Ogre::GCT_BOOL2 = BCT_BOOL + 2 , Ogre::GCT_BOOL3 = BCT_BOOL + 3 , Ogre::GCT_BOOL4 = BCT_BOOL + 4 , Ogre::GCT_UNKNOWN = BCT_UNKNOWN
}
 Enumeration of the types of constant we may encounter in programs. More...
 
enum  Ogre::GpuParamVariability : uint16 {
  Ogre::GPV_GLOBAL = 1 , Ogre::GPV_PER_OBJECT = 2 , Ogre::GPV_LIGHTS = 4 , Ogre::GPV_PASS_ITERATION_NUMBER = 8 ,
  Ogre::GPV_ALL = 0xFFFF
}
 The variability of a GPU parameter, as derived from auto-params targeting it. More...
 
enum  Ogre::IlluminationStage : uint8 { Ogre::IS_AMBIENT , Ogre::IS_PER_LIGHT , Ogre::IS_DECAL , Ogre::IS_UNKNOWN }
 Categorisation of passes for the purpose of additive lighting. More...
 
enum  Ogre::LayerBlendOperation { Ogre::LBO_REPLACE , Ogre::LBO_ADD , Ogre::LBO_MODULATE , Ogre::LBO_ALPHA_BLEND }
 List of valid texture blending operations, for use with TextureUnitState::setColourOperation. More...
 
enum  Ogre::LayerBlendOperationEx {
  Ogre::LBX_SOURCE1 , Ogre::LBX_SOURCE2 , Ogre::LBX_MODULATE , Ogre::LBX_MODULATE_X2 ,
  Ogre::LBX_MODULATE_X4 , Ogre::LBX_ADD , Ogre::LBX_ADD_SIGNED , Ogre::LBX_ADD_SMOOTH ,
  Ogre::LBX_SUBTRACT , Ogre::LBX_BLEND_DIFFUSE_ALPHA , Ogre::LBX_BLEND_TEXTURE_ALPHA , Ogre::LBX_BLEND_CURRENT_ALPHA ,
  Ogre::LBX_BLEND_MANUAL , Ogre::LBX_DOTPRODUCT , Ogre::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  Ogre::LayerBlendSource {
  Ogre::LBS_CURRENT , Ogre::LBS_TEXTURE , Ogre::LBS_DIFFUSE , Ogre::LBS_SPECULAR ,
  Ogre::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  Ogre::LayerBlendType { Ogre::LBT_COLOUR , Ogre::LBT_ALPHA }
 Type of texture blend mode. More...
 
enum  Ogre::SceneBlendFactor {
  Ogre::SBF_ONE , Ogre::SBF_ZERO , Ogre::SBF_DEST_COLOUR , Ogre::SBF_SOURCE_COLOUR ,
  Ogre::SBF_ONE_MINUS_DEST_COLOUR , Ogre::SBF_ONE_MINUS_SOURCE_COLOUR , Ogre::SBF_DEST_ALPHA , Ogre::SBF_SOURCE_ALPHA ,
  Ogre::SBF_ONE_MINUS_DEST_ALPHA , Ogre::SBF_ONE_MINUS_SOURCE_ALPHA
}
 Blending factors for manually blending objects with the scene. More...
 
enum  Ogre::SceneBlendOperation {
  Ogre::SBO_ADD , Ogre::SBO_SUBTRACT , Ogre::SBO_REVERSE_SUBTRACT , Ogre::SBO_MIN ,
  Ogre::SBO_MAX
}
 Blending operations controls how objects are blended into the scene. More...
 
enum  Ogre::SceneBlendType {
  Ogre::SBT_TRANSPARENT_ALPHA , Ogre::SBT_TRANSPARENT_COLOUR , Ogre::SBT_ADD , Ogre::SBT_MODULATE ,
  Ogre::SBT_REPLACE
}
 Types of blending that you can specify between an object and the existing contents of the scene. More...
 

Variables

_OgreExport const String Ogre::MSN_DEFAULT
 Default material scheme name.
 
_OgreExport const String Ogre::MSN_SHADERGEN
 Material scheme of the shader generator.
 

Detailed Description

Typedef Documentation

◆ GpuConstantDefinitionMap

◆ GpuConstantDefinitionIterator

◆ GpuLogicalIndexUseMap

◆ ConstantList

Definition of container that holds the current constants.

Note
Not necessarily in direct index order to constant indexes, logical to physical index map is derived from GpuProgram

◆ IlluminationPassList

◆ SamplerPtr

typedef std::shared_ptr<Sampler> Ogre::SamplerPtr

Enumeration Type Documentation

◆ LayerBlendType

Type of texture blend mode.

Enumerator
LBT_COLOUR 
LBT_ALPHA 

◆ LayerBlendOperation

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

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.

Enumerator
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.

◆ 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.

Enumerator
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 

dot product of color1 and color2

LBX_BLEND_DIFFUSE_COLOUR 

use interpolated color values from vertices to scale source1, then add source2 scaled by (1-color)

◆ LayerBlendSource

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

Enumerator
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

◆ SceneBlendType

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

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
Pass::setSceneBlending
Enumerator
SBT_TRANSPARENT_ALPHA 

The alpha value of the rendering output is used as a mask.

SBT_TRANSPARENT_COLOUR 

Colour the scene based on the brightness of the input colours, but don’t darken.

SBT_ADD 

The colour of the rendering output is added to the scene. Good for explosions, flares, lights, ghosts etc.

SBT_MODULATE 

The colour of the rendering output is multiplied with the scene contents. Generally colours and darkens the scene, good for smoked glass, semi-transparent objects etc.

SBT_REPLACE 

The default blend mode where source replaces destination.

◆ 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.

Enumerator
SBF_ONE 

Constant value of 1.0.

SBF_ZERO 

Constant value of 0.0.

SBF_DEST_COLOUR 

The existing pixel colour.

SBF_SOURCE_COLOUR 

The texture pixel (texel) colour.

SBF_ONE_MINUS_DEST_COLOUR 

1 - SBF_DEST_COLOUR

SBF_ONE_MINUS_SOURCE_COLOUR 

1 - SBF_SOURCE_COLOUR

SBF_DEST_ALPHA 

The existing pixel alpha value.

SBF_SOURCE_ALPHA 

The texel alpha value.

SBF_ONE_MINUS_DEST_ALPHA 

1 - SBF_DEST_ALPHA

SBF_ONE_MINUS_SOURCE_ALPHA 

1 - SBF_SOURCE_ALPHA

◆ SceneBlendOperation

Blending operations controls how objects are blended into the scene.

The default operation is add (+) but by changing this you can change how drawn objects are blended into the existing scene.

Enumerator
SBO_ADD 
SBO_SUBTRACT 
SBO_REVERSE_SUBTRACT 
SBO_MIN 
SBO_MAX 

◆ eTexturePlayMode

Enum for type of texture play mode.

Enumerator
TextureEffectPause 
TextureEffectPlay_ASAP 

Video starts out paused.

TextureEffectPlay_Looping 

Video starts playing as soon as possible.

◆ BaseConstantType

Enumerator
BCT_FLOAT 
BCT_INT 
BCT_DOUBLE 
BCT_UINT 
BCT_BOOL 
BCT_SAMPLER 
BCT_SPECIALIZATION 

shader specialisation constant

BCT_UNKNOWN 

◆ GpuConstantType

Enumeration of the types of constant we may encounter in programs.

Note
Low-level programs, by definition, will always use either float4 or int4 constant types since that is the fundamental underlying type in assembler.
Enumerator
GCT_FLOAT1 
GCT_FLOAT2 
GCT_FLOAT3 
GCT_FLOAT4 
GCT_SAMPLER1D 
GCT_SAMPLER2D 
GCT_SAMPLER3D 
GCT_SAMPLERCUBE 
GCT_SAMPLER1DSHADOW 
GCT_SAMPLER2DSHADOW 
GCT_SAMPLER2DARRAY 
GCT_SAMPLER_EXTERNAL_OES 
GCT_MATRIX_2X2 
GCT_MATRIX_2X3 
GCT_MATRIX_2X4 
GCT_MATRIX_3X2 
GCT_MATRIX_3X3 
GCT_MATRIX_3X4 
GCT_MATRIX_4X2 
GCT_MATRIX_4X3 
GCT_MATRIX_4X4 
GCT_INT1 
GCT_INT2 
GCT_INT3 
GCT_INT4 
GCT_SPECIALIZATION 
GCT_DOUBLE1 
GCT_DOUBLE2 
GCT_DOUBLE3 
GCT_DOUBLE4 
GCT_MATRIX_DOUBLE_2X2 
GCT_MATRIX_DOUBLE_2X3 
GCT_MATRIX_DOUBLE_2X4 
GCT_MATRIX_DOUBLE_3X2 
GCT_MATRIX_DOUBLE_3X3 
GCT_MATRIX_DOUBLE_3X4 
GCT_MATRIX_DOUBLE_4X2 
GCT_MATRIX_DOUBLE_4X3 
GCT_MATRIX_DOUBLE_4X4 
GCT_UINT1 
GCT_UINT2 
GCT_UINT3 
GCT_UINT4 
GCT_BOOL1 
GCT_BOOL2 
GCT_BOOL3 
GCT_BOOL4 
GCT_UNKNOWN 

◆ GpuParamVariability

The variability of a GPU parameter, as derived from auto-params targeting it.

These values must be powers of two since they are used in masks.

Enumerator
GPV_GLOBAL 

No variation except by manual setting - the default.

GPV_PER_OBJECT 

Varies per object (based on an auto param usually), but not per light setup.

GPV_LIGHTS 

Varies with light setup.

GPV_PASS_ITERATION_NUMBER 

Varies with pass iteration number.

GPV_ALL 

Full mask (16-bit)

◆ IlluminationStage

Categorisation of passes for the purpose of additive lighting.

Enumerator
IS_AMBIENT 

Part of the rendering which occurs without any kind of direct lighting.

IS_PER_LIGHT 

Part of the rendering which occurs per light.

IS_DECAL 

Post-lighting rendering.

IS_UNKNOWN 

Not determined.

Variable Documentation

◆ MSN_DEFAULT

_OgreExport const String Ogre::MSN_DEFAULT
extern

Default material scheme name.

◆ MSN_SHADERGEN

_OgreExport const String Ogre::MSN_SHADERGEN
extern

Material scheme of the shader generator.