Class PbrMaterial
PbrMaterial class
Material for physically based rendering based on albedo color/metallic/roughness
public class PbrMaterial : Material
Constructors
| Name | Description |
|---|
| PbrMaterial() | Construct a default PBR material instance |
| PbrMaterial(Vector3) | Construct a default PBR material with specified albedo color value. |
Properties
| Name | Description |
|---|
| Albedo { get; set; } | Gets or sets the base color of the material |
| AlbedoTexture { get; set; } | Gets or sets the texture for albedo |
| EmissiveColor { get; set; } | Gets or sets the emissive color |
| EmissiveTexture { get; set; } | Gets or sets the texture for emissive |
| MetallicFactor { get; set; } | Gets or sets the metalness of the material, value of 1 means the material is a metal and value of 0 means the material is a dielectric. |
| MetallicRoughness { get; set; } | Gets or sets the texture for metallic(in R channel) and roughness(in G channel) |
| virtual Name { get; set; } | Gets or sets the name. |
| NormalTexture { get; set; } | Gets or sets the texture of normal mapping |
| OcclusionFactor { get; set; } | Gets or sets the factor of ambient occlusion |
| OcclusionTexture { get; set; } | Gets or sets the texture for ambient occlusion |
| Properties { get; } | Gets the collection of all properties. |
| RoughnessFactor { get; set; } | Gets or sets the roughness of the material, value of 1 means the material is completely rough and value of 0 means the material is completely smooth |
| SpecularTexture { get; set; } | Gets or sets the texture for specular color |
| Transparency { get; set; } | Gets or sets the transparency factor. The factor should be ranged between 0(0%, fully opaque) and 1(100%, fully transparent) Any invalid factor value will be clamped. |
Methods
| Name | Description |
|---|
| static FromMaterial(Material) | Allow convert other material to PbrMaterial |
| FindProperty(string) | Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name) |
| GetEnumerator() | Gets the enumerator to enumerate internal texture slots. |
| GetProperty(string) | Get the value of specified property |
| GetTexture(string) | Gets the texture from the specified slot, it can be material’s property name or shader’s parameter name |
| RemoveProperty(Property) | Removes a dynamic property. |
| RemoveProperty(string) | Remove the specified property identified by name |
| SetProperty(string, object) | Sets the value of specified property |
| SetTexture(string, TextureBase) | Sets the texture to specified slot |
| override ToString() | Formats object to string |
See Also