您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
20 行
723 B
20 行
723 B
using System;
|
|
using System.Text;
|
|
using UnityEditor.Graphing;
|
|
using UnityEngine;
|
|
|
|
namespace UnityEditor.ShaderGraph.Internal
|
|
{
|
|
[Serializable]
|
|
public abstract class VectorShaderProperty : AbstractShaderProperty<Vector4>
|
|
{
|
|
internal override bool isBatchable => true;
|
|
internal override bool isExposable => true;
|
|
internal override bool isRenamable => true;
|
|
|
|
internal override string GetPropertyBlockString()
|
|
{
|
|
return $"{hideTagString}{referenceName}(\"{displayName}\", Vector) = ({NodeUtils.FloatToShaderValue(value.x)}, {NodeUtils.FloatToShaderValue(value.y)}, {NodeUtils.FloatToShaderValue(value.z)}, {NodeUtils.FloatToShaderValue(value.w)})";
|
|
}
|
|
}
|
|
}
|