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