![]() |
OGRE-Next 4.0.0unstable
Object-Oriented Graphics Rendering Engine
|
Contains information needed by PBS (Physically Based Shading) for OpenGL 3+ & D3D11+. More...
#include <OgreHlmsUnlitDatablock.h>
Public Member Functions | |
| HlmsUnlitDatablock (IdString name, HlmsUnlit *creator, const HlmsMacroblock *macroblock, const HlmsBlendblock *blendblock, const HlmsParamVec ¶ms) | |
| Valid parameters in params: | |
| ~HlmsUnlitDatablock () override | |
| void | calculateHash () override |
| const Matrix4 & | getAnimationMatrix (uint8 textureUnit) const |
| UnlitBlendModes | getBlendMode (uint8 texType) const |
| ColourValue | getColour () const |
| Gets the current colour. The returned value is meaningless if mHasColour is false. | |
| bool | getDefaultGenerateMipmaps () const |
| See HlmsUnlit::getDefaultGenerateMipmaps. | |
| ColourValue | getDiffuseColour () const override |
| ColourValue | getEmissiveColour () const override |
| TextureGpu * | getEmissiveTexture () const override |
| bool | getEnableAnimationMatrix (uint8 textureUnit) const |
| bool | getEnablePlanarReflection (uint8 textureUnit) const |
| void | getTextureSwizzle (uint8 texType, uint8 &r, uint8 &g, uint8 &b, uint8 &a) const |
| Gets the final swizzle used when sampling the given texture. | |
| uint8 | getTextureUvSource (uint8 sourceType) const |
| bool | hasColour () const |
| If this returns false, the values of mR, mG, mB & mA will be ignored. | |
| void | setAnimationMatrix (uint8 textureUnit, const Matrix4 &matrix) |
| void | setBlendMode (uint8 texType, UnlitBlendModes blendMode) |
| Sets the blending mode (how the texture unit gets layered on top of the previous texture units). | |
| void | setColour (const ColourValue &diffuse) |
| Sets a new colour value. Asserts if mHasColour is false. | |
| void | setEnableAnimationMatrix (uint8 textureUnit, bool bEnable) |
| Enables the animation of the given texture unit. | |
| void | setEnablePlanarReflection (uint8 textureUnit, bool bEnable) |
| Set to true if the texture at the given texture unit is a planar reflection texture. | |
| void | setTexture (uint8 texUnit, const String &name, const HlmsSamplerblock *refParams=0) |
| void | setTextureSwizzle (uint8 texType, uint8 r, uint8 g, uint8 b, uint8 a) |
| Sets the final swizzle when sampling the given texture. | |
| void | setTextureUvSource (uint8 sourceType, uint8 uvSet) |
| Sets which UV set to use for the given texture. | |
| void | setUseColour (bool useColour) |
| Controls whether the value in setColour() is used. | |
Public Attributes | |
| Matrix4 | mTextureMatrices [NUM_UNLIT_TEXTURE_TYPES] |
Static Public Attributes | |
| static const uint8 | A_MASK |
| static const uint8 | B_MASK |
| static const uint8 | G_MASK |
| static const uint32 | MaterialSizeInGpu |
| static const uint32 | MaterialSizeInGpuAligned |
| static const uint8 | R_MASK |
Contains information needed by PBS (Physically Based Shading) for OpenGL 3+ & D3D11+.
| Ogre::HlmsUnlitDatablock::HlmsUnlitDatablock | ( | IdString | name, |
| HlmsUnlit * | creator, | ||
| const HlmsMacroblock * | macroblock, | ||
| const HlmsBlendblock * | blendblock, | ||
| const HlmsParamVec & | params ) |
Valid parameters in params:
| params |
|
References HlmsUnlit.
|
override |
|
override |
| UnlitBlendModes Ogre::HlmsUnlitDatablock::getBlendMode | ( | uint8 | texType | ) | const |
|
inline |
Gets the current colour. The returned value is meaningless if mHasColour is false.
| bool Ogre::HlmsUnlitDatablock::getDefaultGenerateMipmaps | ( | ) | const |
|
override |
|
override |
|
override |
| bool Ogre::HlmsUnlitDatablock::getEnableAnimationMatrix | ( | uint8 | textureUnit | ) | const |
| bool Ogre::HlmsUnlitDatablock::getEnablePlanarReflection | ( | uint8 | textureUnit | ) | const |
| void Ogre::HlmsUnlitDatablock::getTextureSwizzle | ( | uint8 | texType, |
| uint8 & | r, | ||
| uint8 & | g, | ||
| uint8 & | b, | ||
| uint8 & | a ) const |
Gets the final swizzle used when sampling the given texture.
| texType | Texture unit. Must be in range [0; NUM_UNLIT_TEXTURE_TYPES) |
| r | Where the red channel is sourced from. Will be R_MASK, G_MASK, B_MASK or A_MASK. |
| g | Where the green channel is sourced from. |
| b | Where the blue channel is sourced from. |
| a | Where the alpha channel is sourced from. |
|
inline |
If this returns false, the values of mR, mG, mB & mA will be ignored.
| void Ogre::HlmsUnlitDatablock::setBlendMode | ( | uint8 | texType, |
| UnlitBlendModes | blendMode ) |
Sets the blending mode (how the texture unit gets layered on top of the previous texture units).
Calling this function triggers a HlmsDatablock::flushRenderables.
| texType | The texture unit. Must be in range [1; NUM_UNLIT_TEXTURE_TYPES) The value 0 is ignored. |
| blendMode | The blending mode to use. |
| void Ogre::HlmsUnlitDatablock::setColour | ( | const ColourValue & | diffuse | ) |
Sets a new colour value. Asserts if mHasColour is false.
| void Ogre::HlmsUnlitDatablock::setEnableAnimationMatrix | ( | uint8 | textureUnit, |
| bool | bEnable ) |
Enables the animation of the given texture unit.
Calling this function triggers a HlmsDatablock::flushRenderables.
| textureUnit | Texture unit. Must be in range [0; NUM_UNLIT_TEXTURE_TYPES) |
| bEnable | Whether to enable or disable. Default is disabled. |
| void Ogre::HlmsUnlitDatablock::setEnablePlanarReflection | ( | uint8 | textureUnit, |
| bool | bEnable ) |
Set to true if the texture at the given texture unit is a planar reflection texture.
UVs will be ignored for that texture unit. Calling this function triggers a HlmsDatablock::flushRenderables.
| textureUnit | Texture unit. Must be in range [0; NUM_UNLIT_TEXTURE_TYPES) |
| bEnable | Whether to enable or disable. Default is disabled. |
| void Ogre::HlmsUnlitDatablock::setTexture | ( | uint8 | texUnit, |
| const String & | name, | ||
| const HlmsSamplerblock * | refParams = 0 ) |
| void Ogre::HlmsUnlitDatablock::setTextureSwizzle | ( | uint8 | texType, |
| uint8 | r, | ||
| uint8 | g, | ||
| uint8 | b, | ||
| uint8 | a ) |
Sets the final swizzle when sampling the given texture.
e.g. calling setTextureSwizzle( 0, R_MASK, G_MASK, R_MASK, G_MASK ); will generated the following pixel shader: vec4 texColour = texture( tex, uv ).xyxy;
Calling this function triggers a HlmsDatablock::flushRenderables.
| texType | Texture unit. Must be in range [0; NUM_UNLIT_TEXTURE_TYPES) |
| r | Where to source the red channel from. Must be R_MASK, G_MASK, B_MASK or A_MASK. Default: R_MASK |
| g | Where to source the green channel from. Default: G_MASK |
| b | Where to source the blue channel from. Default: B_MASK |
| a | Where to source the alpha channel from. Default: A_MASK |
Sets which UV set to use for the given texture.
Calling this function triggers a HlmsDatablock::flushRenderables.
| sourceType | Source texture to modify. Must be in range [0; NUM_UNLIT_TEXTURE_TYPES) |
| uvSet | UV coordinate set. Value must be between in range [0; 8) |
| void Ogre::HlmsUnlitDatablock::setUseColour | ( | bool | useColour | ) |
Controls whether the value in setColour() is used.
Calling this function implies calling see HlmsDatablock::flushRenderables.
|
static |
|
static |
|
static |
|
static |
|
static |
| Matrix4 Ogre::HlmsUnlitDatablock::mTextureMatrices[NUM_UNLIT_TEXTURE_TYPES] |
|
static |