您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
35 行
856 B
35 行
856 B
namespace UnityEngine.Rendering.PostProcessing
|
|
{
|
|
public sealed class PropertySheet
|
|
{
|
|
public MaterialPropertyBlock properties { get; private set; }
|
|
internal Material material { get; private set; }
|
|
|
|
internal PropertySheet(Material material)
|
|
{
|
|
this.material = material;
|
|
properties = new MaterialPropertyBlock();
|
|
}
|
|
|
|
public void ClearKeywords()
|
|
{
|
|
material.shaderKeywords = null;
|
|
}
|
|
|
|
public void EnableKeyword(string keyword)
|
|
{
|
|
material.EnableKeyword(keyword);
|
|
}
|
|
|
|
public void DisableKeyword(string keyword)
|
|
{
|
|
material.DisableKeyword(keyword);
|
|
}
|
|
|
|
internal void Release()
|
|
{
|
|
RuntimeUtilities.Destroy(material);
|
|
material = null;
|
|
}
|
|
}
|
|
}
|