gz/rendering/ogre2/Ogre2Material.hh
Go to the documentation of this file.
Definition: gz/rendering/base/BaseMaterial.hh:41
Ogre 2.x implementation of the material class.
Definition: gz/rendering/ogre2/Ogre2Material.hh:54
virtual void SetMetalness(const float _roughness) override
Set the metalness value. Only affects material of type MT_PBS.
virtual void SetMetalnessMap(const std::string &_metalnessMap) override
Set the material metalness map.
virtual std::string EmissiveMap() const override
Get the URI of the emissive map file.
virtual unsigned int LightMapTexCoordSet() const override
Get the texture coordinate set used by lightmap.
std::string normalMapName
Name of the normal map.
Definition: gz/rendering/ogre2/Ogre2Material.hh:313
virtual ShaderParamsPtr VertexShaderParams() override
Get params for the vertex shader.
virtual float Metalness() const override
Get the metalness value of this material.
virtual bool HasLightMap() const override
Determine if this material has a light map.
virtual float Roughness() const override
Get the roughness value of this material.
void UpdateShaderParams(ConstShaderParamsPtr _params, Ogre::GpuProgramParametersSharedPtr _ogreParams)
Transfer params from ign-rendering type to ogre type.
std::string emissiveMapName
Name of the emissive map.
Definition: gz/rendering/ogre2/Ogre2Material.hh:325
virtual Ogre::TextureGpu * Texture(const std::string &_name)
Get a pointer to the ogre texture by name.
Ogre::MaterialPtr ogreMaterial
Ogre material. Mainly used for render targets.
Definition: gz/rendering/ogre2/Ogre2Material.hh:298
virtual void SetRenderOrder(const float _renderOrder) override
Set the render order. When polygons are coplanar, you can get problems with 'depth fighting' where th...
std::string ogreDatablockId
Unique id assigned to ogre hlms datablock.
Definition: gz/rendering/ogre2/Ogre2Material.hh:334
void UpdateShaderParams()
bind shader parameters that have changed
virtual std::string NormalMap() const override
Get the URI of the normal map file.
virtual void SetDepthWriteEnabled(bool _enabled) override
Specify if depth buffer writing is enabled.
virtual void ClearNormalMap() override
Removes any normal map mapped to this material.
virtual void SetLightMap(const std::string &_lightMap, unsigned int _uvSet=0u) override
Set the material light map.
virtual bool HasRoughnessMap() const override
Determine if this material has a roughness map.
virtual bool ReceiveShadows() const override
Determine if this material receives shadows.
virtual void UpdateTransparency()
Updates the material transparency in the engine, based on transparency and diffuse alpha values.
virtual void PreRender() override
Prepare this object and any of its children for rendering. This should be called for each object in a...
std::string roughnessMapName
Name of the roughness map.
Definition: gz/rendering/ogre2/Ogre2Material.hh:316
virtual math::Color Specular() const override
Get the specular color.
virtual void SetEnvironmentMap(const std::string &_metalnessMap) override
Set the material environment map.
virtual void SetDepthCheckEnabled(bool _enabled) override
Specify if depth buffer checking is enabled.
virtual void SetFragmentShader(const std::string &_path) override
Set the fragment shader.
std::string lightMapName
Name of the light map.
Definition: gz/rendering/ogre2/Ogre2Material.hh:328
virtual void SetVertexShader(const std::string &_path) override
Set the vertex shader.
virtual bool HasEnvironmentMap() const override
Determine if this material has a environment map.
virtual void SetSpecular(const math::Color &_color) override
Set the specular color.
virtual std::string RoughnessMap() const override
Get the URI of the roughness map file.
virtual void ClearEmissiveMap() override
Removes any emissive map mapped to this material.
virtual void SetEmissive(const math::Color &_color) override
Set the emissive color.
std::string textureName
Name of the texture.
Definition: gz/rendering/ogre2/Ogre2Material.hh:310
virtual bool DepthCheckEnabled() const override
Determine if depth buffer checking is enabled.
virtual std::string LightMap() const override
Get the URI of the light map file.
std::string environmentMapName
Name of the environment map.
Definition: gz/rendering/ogre2/Ogre2Material.hh:322
virtual math::Color Emissive() const override
Get the emissive color.
virtual void ClearMetalnessMap() override
Removes any metalness map mapped to this material.
virtual void ClearTexture() override
Removes any texture mapped to this material.
virtual bool HasTexture() const override
Determine if this material has a texture.
virtual void SetTransparency(const double _transparency) override
Set the transparency value.
virtual void SetTextureMapImpl(const std::string &_texture, Ogre::PbsTextureTypes _type)
Set the texture map for this material.
virtual std::string EnvironmentMap() const override
Get the URI of the environment map file.
virtual void SetNormalMap(const std::string &_normalMap) override
Set the material normal map.
virtual void Destroy() override
virtual void SetRoughness(const float _roughness) override
Set the roughness value. Only affects material of type MT_PBS.
virtual Ogre::MaterialPtr Material()
Return ogre low level material.
std::string metalnessMapName
Name of the metalness map.
Definition: gz/rendering/ogre2/Ogre2Material.hh:319
virtual Ogre::HlmsPbsDatablock * Datablock() const
Return ogre Hlms material pbs datablock.
virtual void SetAlphaFromTexture(bool _enabled, double _alpha=0.5, bool _twoSided=true) override
Set the material to use the alpha channel from the textures.
virtual void FillUnlitDatablock(Ogre::HlmsUnlitDatablock *_datablock) const
Fill the input unlit datablock with current material properties from the pbs datablock.
virtual Ogre::HlmsUnlitDatablock * UnlitDatablock()
Return ogre Hlms material unlit datablock.
virtual float RenderOrder() const override
Get the render order value of this material.
virtual void ClearRoughnessMap() override
Removes any roughness map mapped to this material.
virtual std::string MetalnessMap() const override
Get the URI of the metalness map file.
virtual bool HasMetalnessMap() const override
Determine if this material has a metalness map.
virtual std::string Texture() const override
Get the URI of the texture file.
virtual math::Color Diffuse() const override
Get the diffuse color.
virtual bool HasNormalMap() const override
Determine if this material has a normal map.
virtual void SetReceiveShadows(const bool _receiveShadows) override
Specify if this material receives shadows.
virtual void SetTexture(const std::string &_texture) override
Set the material texture.
virtual std::string VertexShader() const override
Get path to the vertex shader.
virtual void SetRoughnessMap(const std::string &_roughnessMap) override
Set the material roughness map.
virtual void Init() override
virtual bool DepthWriteEnabled() const override
Determine if depth buffer writing is enabled.
virtual void ClearEnvironmentMap() override
Removes any environment map mapped to this material.
virtual void ClearLightMap() override
Removes any light map mapped to this material.
virtual void SetDiffuse(const math::Color &_color) override
Set the diffuse color.
virtual std::string FragmentShader() const override
Get path to the fragment shader.
virtual ShaderParamsPtr FragmentShaderParams() override
Get params for the fragment shader.
virtual void SetEmissiveMap(const std::string &_emissiveMap) override
Set the material emissive map.
virtual bool HasEmissiveMap() const override
Determine if this material has an emissive map.
Ogre2.x implementation of the scene class.
Definition: gz/rendering/ogre2/Ogre2Scene.hh:59
Definition: gz/rendering/ogre/OgreCamera.hh:28
MaterialType
An enum for the type of material.
Definition: gz/rendering/Material.hh:37