Material.SetTexture

Material.SetTexture method

将纹理设置到指定槽。

public void SetTexture(string slotName, TextureBase texture)
参数类型描述
slotName字符串槽名称。
纹理TextureBaseTexture.

示例

var mat = new LambertMaterial();
var tex = new Texture();
tex.FileName = "diffuse.png";
mat.SetTexture(Material.MapNormal, tex);

另请参见