PbrMaterial.FromMaterial

PbrMaterial.FromMaterial method

Allow convert other material to PbrMaterial

public static PbrMaterial FromMaterial(Material material)
ParameterTypeDescription
materialMaterial

Examples

var mat = new LambertMaterial();
var tex = new Texture();
tex.FileName = "diffuse.png";
mat.SetTexture(Material.MapDiffuse, tex);
mat.DiffuseColor = new Vector3(0.3, 0.9, 0.4);
PbrMaterial pbr = PbrMaterial.FromMaterial(mat);

See Also