All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Attributes | List of all members
gazebo::rendering::MergeMaterialGenerator Class Reference

Class for generating materials for objects to render themselves in the merging step of deferred lighting. More...

#include <MergeMaterialGenerator.hh>

Inheritance diagram for gazebo::rendering::MergeMaterialGenerator:
Inheritance graph
[legend]
Collaboration diagram for gazebo::rendering::MergeMaterialGenerator:
Collaboration graph
[legend]

Public Types

enum  MaterialPermutations {
  MP_NO_TEXTURES = 0x00000000, MP_ONE_TEXTURE = 0x00000001, MP_TWO_TEXTURES = 0x00000002, MP_THREE_TEXTURES = 0x00000003,
  MP_TEXTURE_MASK = 0x0000000F, MP_HAS_DIFFUSE_COLOUR = 0x00000010, MP_NO_TEXCOORDS = 0x00000000, MP_ONE_TEXCOORD = 0x00000100,
  MP_TWO_TEXCOORDS = 0x00000200, MP_TEXCOORD_MASK = 0x00000700, MP_NORMAL_MAP = 0x00000800, MP_SKINNED = 0x00010000
}
 The relevant options for materials. More...
 
- Public Types inherited from gazebo::rendering::MaterialGenerator
typedef uint32_t Perm
 Bitfield used to signify a material permutations. More...
 

Public Member Functions

 MergeMaterialGenerator (Ogre::String _matName, bool _useDSF)
 
- Public Member Functions inherited from gazebo::rendering::MaterialGenerator
virtual ~MaterialGenerator ()
 
const Ogre::MaterialPtr & GetMaterial (Perm permutation)
 

Static Public Attributes

static const uint32_t FS_MASK = 0x0000FFFF
 The mask of the flags that matter for generating the fragment shader. More...
 
static const uint32_t MAT_MASK = 0xFF00FFFF
 The mask of the flags that matter for generating the material. More...
 
static const uint32_t VS_MASK = 0x00FFFF00
 The mask of the flags that matter for generating the vertex shader. More...
 

Additional Inherited Members

- Protected Types inherited from gazebo::rendering::MaterialGenerator
typedef std::map< Perm,
Ogre::MaterialPtr > 
MaterialMap
 
typedef std::map< Perm,
Ogre::GpuProgramPtr > 
ProgramMap
 
- Protected Member Functions inherited from gazebo::rendering::MaterialGenerator
 MaterialGenerator ()
 constructor is protected as this base class should never be constructed as-is. More...
 
const Ogre::GpuProgramPtr & GetFragmentShader (Perm _perm)
 
const Ogre::MaterialPtr & GetTemplateMaterial (Perm _perm)
 
const Ogre::GpuProgramPtr & GetVertexShader (Perm _perm)
 
- Protected Attributes inherited from gazebo::rendering::MaterialGenerator
ProgramMap fs
 
Perm fsMask
 Mask of permutation bits that influence fragment shader choice. More...
 
Implimpl
 Generator. More...
 
Ogre::String materialBaseName
 Base name of materials generated by this. More...
 
MaterialMap materials
 
Perm matMask
 Mask of permutation bits that influence template material choice. More...
 
std::string schemeName
 
MaterialMap templateMat
 
ProgramMap vs
 
Perm vsMask
 Mask of permutation bits that influence vertex shader choice. More...
 

Detailed Description

Class for generating materials for objects to render themselves in the merging step of deferred lighting.

This stage takes the LBuffer as an input and performs an extra geometry pass. It uses the material info from the geometry pass, and the light info from the LBuffer to recreate the Blinn-Phong lighting model. Alternatively, different lighting models can be recreated(like adding a fresnel term during merging).

Note
This does not support all the possible rendering techniques out there. In order to support more, either expand this class or make sure that objects that will not get treated correctly will not have materials generated for them.

Member Enumeration Documentation

The relevant options for materials.

Enumerator
MP_NO_TEXTURES 
MP_ONE_TEXTURE 
MP_TWO_TEXTURES 
MP_THREE_TEXTURES 
MP_TEXTURE_MASK 
MP_HAS_DIFFUSE_COLOUR 
MP_NO_TEXCOORDS 
MP_ONE_TEXCOORD 
MP_TWO_TEXCOORDS 
MP_TEXCOORD_MASK 
MP_NORMAL_MAP 
MP_SKINNED 

Constructor & Destructor Documentation

gazebo::rendering::MergeMaterialGenerator::MergeMaterialGenerator ( Ogre::String  _matName,
bool  _useDSF 
)

Member Data Documentation

const uint32_t gazebo::rendering::MergeMaterialGenerator::FS_MASK = 0x0000FFFF
static

The mask of the flags that matter for generating the fragment shader.

const uint32_t gazebo::rendering::MergeMaterialGenerator::MAT_MASK = 0xFF00FFFF
static

The mask of the flags that matter for generating the material.

const uint32_t gazebo::rendering::MergeMaterialGenerator::VS_MASK = 0x00FFFF00
static

The mask of the flags that matter for generating the vertex shader.


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