您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

33 行
979 B

using System;
using System.Text;
using UnityEngine;
namespace UnityEditor.ShaderGraph
{
[Serializable]
public abstract class VectorShaderProperty : AbstractShaderProperty<Vector4>
{
public override string GetPropertyBlockString()
{
var result = new StringBuilder();
result.Append(referenceName);
result.Append("(\"");
result.Append(displayName);
result.Append("\", Vector) = (");
result.Append(value.x);
result.Append(",");
result.Append(value.y);
result.Append(",");
result.Append(value.z);
result.Append(",");
result.Append(value.w);
result.Append(")");
return result.ToString();
}
public override string GetPropertyDeclarationString(string delimiter = ";")
{
return string.Format("float4 {0}{1}", referenceName, delimiter);
}
}
}