浏览代码

Fix for issue #222

Changed to use correct dimensions in declarations of properties.
/main
Keijiro Takahashi 7 年前
当前提交
a3b44dd5
共有 4 个文件被更改,包括 14 次插入5 次删除
  1. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector2ShaderProperty.cs
  2. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector3ShaderProperty.cs
  3. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector4ShaderProperty.cs
  4. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/VectorShaderProperty.cs

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector2ShaderProperty.cs


get { return new Vector4(value.x, value.y, 0, 0); }
}
public override string GetPropertyDeclarationString(string delimiter = ";")
{
return string.Format("float2 {0}{1}", referenceName, delimiter);
}
public override PreviewProperty GetPreviewMaterialProperty()
{

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector3ShaderProperty.cs


get { return new Vector4(value.x, value.y, value.z, 0); }
}
public override string GetPropertyDeclarationString(string delimiter = ";")
{
return string.Format("float3 {0}{1}", referenceName, delimiter);
}
public override PreviewProperty GetPreviewMaterialProperty()
{
return new PreviewProperty(PropertyType.Vector3)

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector4ShaderProperty.cs


get { return value; }
}
public override string GetPropertyDeclarationString(string delimiter = ";")
{
return string.Format("float4 {0}{1}", referenceName, delimiter);
}
public override PreviewProperty GetPreviewMaterialProperty()
{
return new PreviewProperty(PropertyType.Vector4)

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/VectorShaderProperty.cs


result.Append(")");
return result.ToString();
}
public override string GetPropertyDeclarationString(string delimiter = ";")
{
return string.Format("float4 {0}{1}", referenceName, delimiter);
}
}
}
正在加载...
取消
保存