SLProject 4.0.000
SLMaterial Class Reference

Defines a standard CG material with textures and a shader program. More...

#include <SLMaterial.h>

Inheritance diagram for SLMaterial:
[legend]

Public Member Functions

 SLMaterial (SLAssetManager *am, const SLchar *name, const SLCol4f &amdi=SLCol4f::WHITE, const SLCol4f &spec=SLCol4f::WHITE, SLfloat shininess=100.0f, SLfloat kr=0.0, SLfloat kt=0.0f, SLfloat kn=1.0f, SLGLProgram *program=nullptr)
 Default ctor for Blinn-Phong reflection model materials without textures. More...
 
 SLMaterial (SLAssetManager *am, const SLchar *name, SLGLTexture *texture1, SLGLTexture *texture2=nullptr, SLGLTexture *texture3=nullptr, SLGLTexture *texture4=nullptr, SLGLProgram *program=nullptr)
 Ctor for textured Blinn-Phong reflection model materials. More...
 
 SLMaterial (SLAssetManager *am, const SLchar *name, SLSkybox *skybox, SLCol4f diffuse, SLfloat roughness, SLfloat metalness, SLGLProgram *program=nullptr)
 Ctor for PBR material with Cook-Torrance material parameters. More...
 
 SLMaterial (SLAssetManager *am, const SLchar *name, SLSkybox *skybox, SLGLTexture *texture1, SLGLTexture *texture2=nullptr, SLGLTexture *texture3=nullptr, SLGLTexture *texture4=nullptr, SLGLTexture *texture5=nullptr, SLGLProgram *program=nullptr)
 Ctor for PBR material with Cook-Torrance material textures. More...
 
 SLMaterial (SLAssetManager *am, const SLchar *name, SLParticleSystem *ps, SLGLTexture *texture, SLGLProgram *program=nullptr, SLGLProgram *programTF=nullptr)
 Ctor for Particle System material with one texture (Draw and update) More...
 
 SLMaterial (SLAssetManager *am, SLGLProgram *colorUniformProgram, const SLCol4f &uniformColor, const SLchar *name=(const char *)"Uniform color")
 Ctor for uniform color material without lighting. More...
 
 SLMaterial (SLAssetManager *am, const SLchar *name, SLGLProgram *program)
 Ctor for only a program. More...
 
 ~SLMaterial () override
 
void generateProgramPS ()
 
void activate (SLCamera *cam, SLVLight *lights, SLSkybox *skybox=nullptr)
 
SLint passToUniforms (SLGLProgram *program, SLint nextTexUnit)
 Passes all material parameters as uniforms to the passed shader program. More...
 
SLbool hasAlpha ()
 Returns true if there is any transparency in diffuse alpha or textures. More...
 
SLbool has3DTexture ()
 Returns true if a material has a 3D texture. More...
 
SLbool usesUVIndex (SLbyte uvIndex)
 Returns true if the specified uvIndex is used by one of the textures. More...
 
SLbool needsTangents ()
 
SLbool hasTextureType (SLTextureType tt)
 
SLbool hasTextureTypeWithUVIndex (SLTextureType tt, SLuint texIndex, SLbyte uvIndex)
 
void removeTextureType (SLTextureType tt)
 
void addTexture (SLGLTexture *texture)
 Adds the passed texture to the equivalent texture type vector. More...
 
SLstring texturesString ()
 Returns a unique string that represent all textures used. More...
 
void assetManager (SLAssetManager *am)
 
void reflectionModel (SLReflectionModel rm)
 
void ambient (const SLCol4f &ambi)
 
void diffuse (const SLCol4f &diff)
 
void ambientDiffuse (const SLCol4f &am_di)
 
void specular (const SLCol4f &spec)
 
void emissive (const SLCol4f &emis)
 
void transmissive (const SLCol4f &transm)
 
void translucency (SLfloat transl)
 
void shininess (SLfloat shin)
 
void roughness (SLfloat r)
 
void metalness (SLfloat m)
 
void kr (SLfloat kr)
 
void kt (SLfloat kt)
 
void kn (SLfloat kn)
 
void getsShadows (SLbool receivesShadows)
 
void program (SLGLProgram *sp)
 
void programTF (SLGLProgram *sp)
 
void skybox (SLSkybox *sb)
 
void ps (SLParticleSystem *ps)
 
SLAssetManagerassetManager ()
 
SLReflectionModel reflectionModel ()
 
SLCol4f ambient ()
 
SLCol4f diffuse ()
 
SLCol4f specular ()
 
SLCol4f emissive ()
 
SLfloat shininess () const
 
SLfloat roughness () const
 
SLfloat metalness () const
 
SLCol4f transmissive ()
 
SLfloat translucency () const
 
SLfloat kr () const
 
SLfloat kt () const
 
SLfloat kn () const
 
SLbool getsShadows () const
 
SLuint numTextures ()
 
SLGLProgramprogram ()
 
SLGLProgramprogramTF ()
 
SLSkyboxskybox ()
 
SLParticleSystemps ()
 
SLVNodenodesVisible2D ()
 
SLVNodenodesVisible3D ()
 
SLVGLTexturetextures (SLTextureType type)
 
SLVGLTexturetextures3d ()
 
- Public Member Functions inherited from SLObject
 SLObject (const SLstring &Name="", const SLstring &url="")
 
virtual ~SLObject ()
 
void name (const SLstring &Name)
 
void url (const SLstring &url)
 
const SLstringname () const
 
const SLstringurl () const
 

Static Public Attributes

static SLfloat K
 PM: Constant of gloss calibration (slope of point light at dist 1) More...
 
static SLfloat PERFECT = 1000.0f
 PM: shininess/translucency limit. More...
 

Protected Attributes

SLAssetManager_assetManager
 pointer to the asset manager (the owner) if available More...
 
SLReflectionModel _reflectionModel
 reflection model (RM_BlinnPhong or RM_CookTorrance) More...
 
SLCol4f _ambient
 ambient color (RGB reflection coefficients) More...
 
SLCol4f _diffuse
 diffuse color (RGB reflection coefficients) More...
 
SLCol4f _specular
 specular color (RGB reflection coefficients) More...
 
SLCol4f _emissive
 emissive color coefficients More...
 
SLfloat _shininess
 shininess exponent in Blinn-Phong model More...
 
SLfloat _roughness
 roughness property (0-1) in Cook-Torrance model More...
 
SLfloat _metalness
 metallic property (0-1) in Cook-Torrance model More...
 
SLCol4f _transmissive
 transmissive color (RGB reflection coefficients) for path tracing More...
 
SLfloat _translucency
 translucency exponent for light refraction for path tracing More...
 
SLfloat _kr {}
 reflection coefficient 0.0 - 1.0 used for ray and path tracing More...
 
SLfloat _kt {}
 transmission coefficient 0.0 - 1.0 used for ray and path tracing More...
 
SLfloat _kn {}
 refraction index More...
 
SLbool _getsShadows
 true if shadows are visible on this material More...
 
SLGLProgram_program {}
 pointer to a GLSL shader program More...
 
SLGLProgram_programTF {}
 pointer to a GLSL shader program for transformFeedback More...
 
SLint _numTextures
 number of textures in all _textures vectors array More...
 
SLSkybox_skybox
 pointer to the skybox More...
 
SLParticleSystem_ps
 pointer to a particle system More...
 
SLVGLTexture _textures [TT_numTextureType]
 array of texture vectors one for each type More...
 
SLVGLTexture _textures3d
 texture vector for diffuse 3D textures More...
 
SLGLTexture_errorTexture = nullptr
 pointer to error texture that is shown if another texture fails More...
 
SLstring _compileErrorTexFilePath
 path to the error texture More...
 
SLVNode _nodesVisible2D
 Vector of all visible 2D nodes of with this material. More...
 
SLVNode _nodesVisible3D
 Vector of all visible 3D nodes of with this material. More...
 
- Protected Attributes inherited from SLObject
SLstring _name
 name of an object More...
 
SLstring _url
 uniform resource locator More...
 

Detailed Description

Defines a standard CG material with textures and a shader program.

The SLMaterial class defines a material with either the Blinn-Phong (default) or the Cook-Torrance reflection) model.

In the Blinn-Phong reflection model the following parameters get used:
The ambient, diffuse, specular and emissive color as well as the shininess parameter as shininess exponent. Instead of the diffuse color a texture of type TT_diffuse can be used.
In the Cook-Torrance reflection model only the diffuse color and the roughness and metallic parameter are used. All parameters can be provided also as a texture of the appropriate type. This reflection model corresponds to the Physically Based Rendering (PBR) material model.
In addition it has coefficients for reflectivity (kr), transparency (kt) and refraction index (kn) that can be used in special shaders and ray tracing.
A material has an array of empty vectors of SLGLTexture pointers. One for each SLTextureType.
The shading has to be implemented in the GLSL program (SLGLProgram) with a vertex and fragment shader. If no SLGLProgram is assigned, a pair of shaders (a vertex and fragment shader) gets automatically generated according to the reflection model and the material parameters. See SLGLProgramGenerated for more details.

Constructor & Destructor Documentation

◆ SLMaterial() [1/7]

SLMaterial::SLMaterial ( SLAssetManager am,
const SLchar name,
const SLCol4f amdi = SLCol4f::WHITE,
const SLCol4f spec = SLCol4f::WHITE,
SLfloat  shininess = 100.0f,
SLfloat  kr = 0.0,
SLfloat  kt = 0.0f,
SLfloat  kn = 1.0f,
SLGLProgram program = nullptr 
)
explicit

Default ctor for Blinn-Phong reflection model materials without textures.

Default constructor for Blinn-Phong reflection model materials without textures. Materials can be used by multiple meshes (SLMesh). Materials can belong therefore to the global assets such as meshes, materials, textures and shader programs.

Parameters
amPointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation.
nameName of the material
amdiAmbient and diffuse color
specSpecular color
shininessShininess exponent (the higher the sharper the gloss)
krReflection coefficient used for ray tracing. (0.0-1.0)
ktTransparency coefficient used for ray tracing. (0.0-1.0)
knRefraction index used for ray tracing (1.0-2.5)
programPointer to the shader program for the material. If none is passed a program will be generated from the passed parameters.

◆ SLMaterial() [2/7]

SLMaterial::SLMaterial ( SLAssetManager am,
const SLchar name,
SLGLTexture texture1,
SLGLTexture texture2 = nullptr,
SLGLTexture texture3 = nullptr,
SLGLTexture texture4 = nullptr,
SLGLProgram program = nullptr 
)

Ctor for textured Blinn-Phong reflection model materials.

Constructor for textured Blinn-Phong reflection model materials. Materials can be used by multiple meshes (SLMesh). Materials can belong therefore to the global assets such as meshes, materials, textures and shader programs.

Parameters
amPointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation.
nameName of the material
texture1Pointer to an SLGLTexture of a specific SLTextureType
texture2Pointer to an SLGLTexture of a specific SLTextureType
texture3Pointer to an SLGLTexture of a specific SLTextureType
texture4Pointer to an SLGLTexture of a specific SLTextureType
programPointer to the shader program for the material. If none is passed a program will be generated from the passed parameters.

◆ SLMaterial() [3/7]

SLMaterial::SLMaterial ( SLAssetManager am,
const SLchar name,
SLSkybox skybox,
SLCol4f  diffuse,
SLfloat  roughness,
SLfloat  metalness,
SLGLProgram program = nullptr 
)

Ctor for PBR material with Cook-Torrance material parameters.

Constructor for Cook-Torrance shaded materials with roughness and metalness. Materials can be used by multiple meshes (SLMesh). Materials can belong therefore to the global assets such as meshes, materials, textures and shader programs.

Parameters
amPointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation.
nameName of the material
skyboxPointer to the skybox if available
diffuseDiffuse reflection color
roughnessRoughness (0.0-1.0)
metalnessMetalness (0.0-1.0)
programPointer to the shader program for the material. If none is passed a program will be generated from the passed parameters.

◆ SLMaterial() [4/7]

SLMaterial::SLMaterial ( SLAssetManager am,
const SLchar name,
SLSkybox skybox,
SLGLTexture texture1,
SLGLTexture texture2 = nullptr,
SLGLTexture texture3 = nullptr,
SLGLTexture texture4 = nullptr,
SLGLTexture texture5 = nullptr,
SLGLProgram program = nullptr 
)

Ctor for PBR material with Cook-Torrance material textures.

Constructor for Cook-Torrance shaded materials with PBR textures. Materials can be used by multiple meshes (SLMesh). Materials can belong therefore to the global assets such as meshes, materials, textures and shader programs.

Parameters
amPointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation.
nameName of the material
skyboxPointer to the skybox if available. If the skybox is an HDR skybox it will influence the ambient and specular reflection.
texture1Pointer to a SLGLTexture of a specific SLTextureType. For PBR materials this can be TT_diffuse, TT_normal, TT_roughness, TT_metallic and TT_occlusion.
texture2Pointer to a SLGLTexture of a specific SLTextureType.
texture3Pointer to a SLGLTexture of a specific SLTextureType.
texture4Pointer to a SLGLTexture of a specific SLTextureType.
texture5Pointer to a SLGLTexture of a specific SLTextureType.
programPointer to the shader program for the material. If none is passed a program will be generated from the passed parameters.

◆ SLMaterial() [5/7]

SLMaterial::SLMaterial ( SLAssetManager am,
const SLchar name,
SLParticleSystem ps,
SLGLTexture texture,
SLGLProgram program = nullptr,
SLGLProgram programTF = nullptr 
)

Ctor for Particle System material with one texture (Draw and update)

Constructor for textured particle system materials (Draw=. Materials can be used by multiple meshes (SLMesh). Materials can belong therefore to the global assets such as meshes, materials, textures and shader programs.

Parameters
amPointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation.
nameName of the material
texturePointer to an SLGLTexture of a specific SLTextureType
psPointer to the particle system for the material.
programPointer to the shader program for the material. If none is passed a program will be generated from the passed parameters.
programTFPointer to the shader program for Transform Feedback

◆ SLMaterial() [6/7]

SLMaterial::SLMaterial ( SLAssetManager am,
SLGLProgram colorUniformProgram,
const SLCol4f uniformColor,
const SLchar name = (const char*)"Uniform color" 
)
explicit

Ctor for uniform color material without lighting.

Constructor for uniform color material without lighting Materials can be used by multiple meshes (SLMesh). Materials can belong therefore to the global assets such as meshes, materials, textures and shader programs.

Parameters
amPointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation.
colorUniformProgramPointer to shader program for uniform coloring.
uniformColorColor to apply
nameName of the material

◆ SLMaterial() [7/7]

SLMaterial::SLMaterial ( SLAssetManager am,
const SLchar name,
SLGLProgram shaderProg 
)

Ctor for only a program.

Constructor for materials with only a shader program. Materials can be used by multiple meshes (SLMesh). Materials can belong therefore to the global assets such as meshes, materials, textures and shader programs.

Parameters
amPointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation.
nameName of the material
shaderProgPointer to the shader program for the material

◆ ~SLMaterial()

SLMaterial::~SLMaterial ( )
override

The destructor should be called by the owner of the material. If an asset manager was passed in the constructor it will do it after scene destruction. The textures (SLGLTexture) and the shader program (SLGLProgram) that the material uses will not be deallocated.

Member Function Documentation

◆ activate()

void SLMaterial::activate ( SLCamera cam,
SLVLight lights,
SLSkybox skybox = nullptr 
)

SLMaterial::activate activates this material for rendering if it is not yet the active one and set as SLGLState::currentMaterial. If this material has not yet a shader program assigned (SLMaterial::_program) a suitable program will be generated with an instance of SLGLProgramGenerated. At the end the shader program will begin its usage with SLGLProgram::beginUse.

Parameters
camPointer to the active camera
lightsPointer to the scene vector of lights
skyboxPointer to the skybox

◆ addTexture()

void SLMaterial::addTexture ( SLGLTexture texture)

Adds the passed texture to the equivalent texture type vector.

◆ ambient() [1/2]

SLCol4f SLMaterial::ambient ( )
inline

◆ ambient() [2/2]

void SLMaterial::ambient ( const SLCol4f ambi)
inline

◆ ambientDiffuse()

void SLMaterial::ambientDiffuse ( const SLCol4f am_di)
inline

◆ assetManager() [1/2]

SLAssetManager * SLMaterial::assetManager ( )
inline

◆ assetManager() [2/2]

void SLMaterial::assetManager ( SLAssetManager am)
inline

◆ diffuse() [1/2]

SLCol4f SLMaterial::diffuse ( )
inline

◆ diffuse() [2/2]

void SLMaterial::diffuse ( const SLCol4f diff)
inline

◆ emissive() [1/2]

SLCol4f SLMaterial::emissive ( )
inline

◆ emissive() [2/2]

void SLMaterial::emissive ( const SLCol4f emis)
inline

◆ generateProgramPS()

void SLMaterial::generateProgramPS ( )

If this material has not yet a shader program assigned (SLMaterial::_program) a suitable program will be generated with an instance of SLGLProgramGenerated.

◆ getsShadows() [1/2]

SLbool SLMaterial::getsShadows ( ) const
inline

◆ getsShadows() [2/2]

void SLMaterial::getsShadows ( SLbool  receivesShadows)
inline

◆ has3DTexture()

SLbool SLMaterial::has3DTexture ( )
inline

Returns true if a material has a 3D texture.

◆ hasAlpha()

SLbool SLMaterial::hasAlpha ( )
inline

Returns true if there is any transparency in diffuse alpha or textures.

◆ hasTextureType()

SLbool SLMaterial::hasTextureType ( SLTextureType  tt)
inline

◆ hasTextureTypeWithUVIndex()

SLbool SLMaterial::hasTextureTypeWithUVIndex ( SLTextureType  tt,
SLuint  texIndex,
SLbyte  uvIndex 
)
inline

◆ kn() [1/2]

SLfloat SLMaterial::kn ( ) const
inline

◆ kn() [2/2]

void SLMaterial::kn ( SLfloat  kn)
inline

◆ kr() [1/2]

SLfloat SLMaterial::kr ( ) const
inline

◆ kr() [2/2]

void SLMaterial::kr ( SLfloat  kr)
inline

◆ kt() [1/2]

SLfloat SLMaterial::kt ( ) const
inline

◆ kt() [2/2]

void SLMaterial::kt ( SLfloat  kt)
inline

◆ metalness() [1/2]

SLfloat SLMaterial::metalness ( ) const
inline

◆ metalness() [2/2]

void SLMaterial::metalness ( SLfloat  m)
inline

◆ needsTangents()

SLbool SLMaterial::needsTangents ( )
inline

◆ nodesVisible2D()

SLVNode & SLMaterial::nodesVisible2D ( )
inline

◆ nodesVisible3D()

SLVNode & SLMaterial::nodesVisible3D ( )
inline

◆ numTextures()

SLuint SLMaterial::numTextures ( )
inline

◆ passToUniforms()

SLint SLMaterial::passToUniforms ( SLGLProgram program,
SLint  nextTexUnit 
)

Passes all material parameters as uniforms to the passed shader program.

◆ program() [1/2]

SLGLProgram * SLMaterial::program ( )
inline

◆ program() [2/2]

void SLMaterial::program ( SLGLProgram sp)
inline

◆ programTF() [1/2]

SLGLProgram * SLMaterial::programTF ( )
inline

◆ programTF() [2/2]

void SLMaterial::programTF ( SLGLProgram sp)
inline

◆ ps() [1/2]

SLParticleSystem * SLMaterial::ps ( )
inline

◆ ps() [2/2]

void SLMaterial::ps ( SLParticleSystem ps)
inline

◆ reflectionModel() [1/2]

SLReflectionModel SLMaterial::reflectionModel ( )
inline

◆ reflectionModel() [2/2]

void SLMaterial::reflectionModel ( SLReflectionModel  rm)
inline

◆ removeTextureType()

void SLMaterial::removeTextureType ( SLTextureType  tt)
inline

◆ roughness() [1/2]

SLfloat SLMaterial::roughness ( ) const
inline

◆ roughness() [2/2]

void SLMaterial::roughness ( SLfloat  r)
inline

◆ shininess() [1/2]

SLfloat SLMaterial::shininess ( ) const
inline

◆ shininess() [2/2]

void SLMaterial::shininess ( SLfloat  shin)
inline

◆ skybox() [1/2]

SLSkybox * SLMaterial::skybox ( )
inline

◆ skybox() [2/2]

void SLMaterial::skybox ( SLSkybox sb)
inline

◆ specular() [1/2]

SLCol4f SLMaterial::specular ( )
inline

◆ specular() [2/2]

void SLMaterial::specular ( const SLCol4f spec)
inline

◆ textures()

SLVGLTexture & SLMaterial::textures ( SLTextureType  type)
inline

◆ textures3d()

SLVGLTexture & SLMaterial::textures3d ( )
inline

◆ texturesString()

SLstring SLMaterial::texturesString ( )

Returns a unique string that represent all textures used.

◆ translucency() [1/2]

SLfloat SLMaterial::translucency ( ) const
inline

◆ translucency() [2/2]

void SLMaterial::translucency ( SLfloat  transl)
inline

◆ transmissive() [1/2]

SLCol4f SLMaterial::transmissive ( )
inline

◆ transmissive() [2/2]

void SLMaterial::transmissive ( const SLCol4f transm)
inline

◆ usesUVIndex()

SLbool SLMaterial::usesUVIndex ( SLbyte  uvIndex)

Returns true if the specified uvIndex is used by one of the textures.

Member Data Documentation

◆ _ambient

SLCol4f SLMaterial::_ambient
protected

ambient color (RGB reflection coefficients)

◆ _assetManager

SLAssetManager* SLMaterial::_assetManager
protected

pointer to the asset manager (the owner) if available

◆ _compileErrorTexFilePath

SLstring SLMaterial::_compileErrorTexFilePath
protected

path to the error texture

◆ _diffuse

SLCol4f SLMaterial::_diffuse
protected

diffuse color (RGB reflection coefficients)

◆ _emissive

SLCol4f SLMaterial::_emissive
protected

emissive color coefficients

◆ _errorTexture

SLGLTexture* SLMaterial::_errorTexture = nullptr
protected

pointer to error texture that is shown if another texture fails

◆ _getsShadows

SLbool SLMaterial::_getsShadows
protected

true if shadows are visible on this material

◆ _kn

SLfloat SLMaterial::_kn {}
protected

refraction index

◆ _kr

SLfloat SLMaterial::_kr {}
protected

reflection coefficient 0.0 - 1.0 used for ray and path tracing

◆ _kt

SLfloat SLMaterial::_kt {}
protected

transmission coefficient 0.0 - 1.0 used for ray and path tracing

◆ _metalness

SLfloat SLMaterial::_metalness
protected

metallic property (0-1) in Cook-Torrance model

◆ _nodesVisible2D

SLVNode SLMaterial::_nodesVisible2D
protected

Vector of all visible 2D nodes of with this material.

◆ _nodesVisible3D

SLVNode SLMaterial::_nodesVisible3D
protected

Vector of all visible 3D nodes of with this material.

◆ _numTextures

SLint SLMaterial::_numTextures
protected

number of textures in all _textures vectors array

◆ _program

SLGLProgram* SLMaterial::_program {}
protected

pointer to a GLSL shader program

◆ _programTF

SLGLProgram* SLMaterial::_programTF {}
protected

pointer to a GLSL shader program for transformFeedback

◆ _ps

SLParticleSystem* SLMaterial::_ps
protected

pointer to a particle system

◆ _reflectionModel

SLReflectionModel SLMaterial::_reflectionModel
protected

reflection model (RM_BlinnPhong or RM_CookTorrance)

◆ _roughness

SLfloat SLMaterial::_roughness
protected

roughness property (0-1) in Cook-Torrance model

◆ _shininess

SLfloat SLMaterial::_shininess
protected

shininess exponent in Blinn-Phong model

◆ _skybox

SLSkybox* SLMaterial::_skybox
protected

pointer to the skybox

◆ _specular

SLCol4f SLMaterial::_specular
protected

specular color (RGB reflection coefficients)

◆ _textures

SLVGLTexture SLMaterial::_textures[TT_numTextureType]
protected

array of texture vectors one for each type

◆ _textures3d

SLVGLTexture SLMaterial::_textures3d
protected

texture vector for diffuse 3D textures

◆ _translucency

SLfloat SLMaterial::_translucency
protected

translucency exponent for light refraction for path tracing

◆ _transmissive

SLCol4f SLMaterial::_transmissive
protected

transmissive color (RGB reflection coefficients) for path tracing

◆ K

SLfloat SLMaterial::K
static

PM: Constant of gloss calibration (slope of point light at dist 1)

◆ PERFECT

SLfloat SLMaterial::PERFECT = 1000.0f
static

PM: shininess/translucency limit.


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