Class IMaterial
Interface for material objects.
Inheritance
Assembly: FlaxEngine.dll
File: Engine/Graphics/Materials/IMaterial.h
Syntax
public class IMaterialMethods
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) = 0Parameters
| 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) constParameters
| 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() constReturns
| bool True if can use lightmaps, otherwise false | 
GetDrawModes()
Gets the mask of render passes supported by this material.
Declaration
public virtual DrawPass GetDrawModes() constReturns
| DrawPass The draw passes supported by this material. | 
GetInfo()
Gets the material info, structure which describes material surface.
Declaration
public virtual MaterialInfo GetInfo() const = 0Returns
| MaterialInfo The constant reference to the material descriptor. | 
GetShader()
Gets the shader resource.
Declaration
public virtual GPUShader* GetShader() const = 0Returns
| GPUShader The material shader resource. | 
IsDecal()
Determines whether material is a decal.
Declaration
public bool IsDecal() constReturns
| bool 
 | 
IsDeformable()
Determines whether material is a deformable shader.
Declaration
public bool IsDeformable() constReturns
| bool 
 | 
IsGUI()
Determines whether material is a GUI shader.
Declaration
public bool IsGUI() constReturns
| bool 
 | 
IsParticle()
Determines whether material is a particle shader.
Declaration
public bool IsParticle() constReturns
| bool 
 | 
IsPostFx()
Determines whether material is a post fx.
Declaration
public bool IsPostFx() constReturns
| bool 
 | 
IsReady()
Returns true if material is ready for rendering.
Declaration
public virtual bool IsReady() const = 0Returns
| bool True if can render that material | 
IsSurface()
Determines whether material is a surface shader.
Declaration
public bool IsSurface() constReturns
| bool 
 | 
IsTerrain()
Determines whether material is a terrain shader.
Declaration
public bool IsTerrain() constReturns
| bool 
 |