Search Results for

    Show / Hide Table of Contents

    Class IMaterial

    Interface for material objects.

    Inheritance
    IMaterial
    Assembly: FlaxEngine.dll
    File: Engine/Graphics/Materials/IMaterial.h
    Syntax
    public class IMaterial

    Methods

    Bind(BindParameters& params)

    Binds the material state to the GPU pipeline. Should be called before the draw command.

    Declaration
    public virtual void Bind(BindParameters& params) = 0
    Parameters
    BindParameters params

    The material bind settings.

    CanUseInstancing(InstancingHandler& handler)

    Returns true if material can use draw calls instancing.

    Declaration
    public virtual bool CanUseInstancing(InstancingHandler& handler) const
    Parameters
    InstancingHandler handler

    The output data for the instancing handling used to hash, batch and write draw calls. Valid only when function returns true.

    Returns
    bool

    True if can use instancing, otherwise false.

    CanUseLightmap()

    Returns true if material can use lightmaps (this includes lightmaps offline baking and sampling at runtime).

    Declaration
    public virtual bool CanUseLightmap() const
    Returns
    bool

    True if can use lightmaps, otherwise false

    GetDrawModes()

    Gets the mask of render passes supported by this material.

    Declaration
    public virtual DrawPass GetDrawModes() const
    Returns
    DrawPass

    The draw passes supported by this material.

    GetInfo()

    Gets the material info, structure which describes material surface.

    Declaration
    public virtual MaterialInfo GetInfo() const = 0
    Returns
    MaterialInfo

    The constant reference to the material descriptor.

    GetShader()

    Gets the shader resource.

    Declaration
    public virtual GPUShader* GetShader() const = 0
    Returns
    GPUShader

    The material shader resource.

    IsDecal()

    Determines whether material is a decal.

    Declaration
    public bool IsDecal() const
    Returns
    bool

    IsDeformable()

    Determines whether material is a deformable shader.

    Declaration
    public bool IsDeformable() const
    Returns
    bool

    IsGUI()

    Determines whether material is a GUI shader.

    Declaration
    public bool IsGUI() const
    Returns
    bool

    IsParticle()

    Determines whether material is a particle shader.

    Declaration
    public bool IsParticle() const
    Returns
    bool

    IsPostFx()

    Determines whether material is a post fx.

    Declaration
    public bool IsPostFx() const
    Returns
    bool

    IsReady()

    Returns true if material is ready for rendering.

    Declaration
    public virtual bool IsReady() const = 0
    Returns
    bool

    True if can render that material

    IsSurface()

    Determines whether material is a surface shader.

    Declaration
    public bool IsSurface() const
    Returns
    bool

    IsTerrain()

    Determines whether material is a terrain shader.

    Declaration
    public bool IsTerrain() const
    Returns
    bool

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • Bind(BindParameters& params)
      • CanUseInstancing(InstancingHandler& handler)
      • CanUseLightmap()
      • GetDrawModes()
      • GetInfo()
      • GetShader()
      • IsDecal()
      • IsDeformable()
      • IsGUI()
      • IsParticle()
      • IsPostFx()
      • IsReady()
      • IsSurface()
      • IsTerrain()
    Back to top Copyright © 2012-2024 Wojciech Figat