浏览代码

remove files that should not be there.

/main
Tim Cooper 7 年前
当前提交
0e092ee5
共有 4 个文件被更改,包括 0 次插入255 次删除
  1. 115
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Matrix/Matrix2Node.cs.orig
  2. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Matrix/Matrix2Node.cs.orig.meta
  3. 126
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Matrix/Matrix3Node.cs.orig
  4. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Matrix/Matrix3Node.cs.orig.meta

115
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Matrix/Matrix2Node.cs.orig


using UnityEditor.MaterialGraph.Drawing.Controls;
using UnityEngine.Graphing;
namespace UnityEngine.MaterialGraph
{
[Title("Input/Matrix/Matrix 2")]
public class Matrix2Node : AbstractMaterialNode, IGeneratesBodyCode
{
const int kOutputSlotId = 0;
const string kOutputSlotName = "Value";
[SerializeField]
Vector2 m_Row0;
[SerializeField]
Vector2 m_Row1;
[MultiFloatControl("", " ", " ", " ", " ")]
public Vector2 row0
{
get { return m_Row0; }
set { SetRow(ref m_Row0, value); }
}
[MultiFloatControl("", " ", " ", " ", " ")]
public Vector2 row1
{
get { return m_Row1; }
set { SetRow(ref m_Row1, value); }
}
void SetRow(ref Vector2 row, Vector2 value)
{
if (value == row)
return;
row = value;
if (onModified != null)
onModified(this, ModificationScope.Graph);
}
public Matrix2Node()
{
name = "Matrix2";
UpdateNodeAfterDeserialization();
}
public sealed override void UpdateNodeAfterDeserialization()
{
AddSlot(new Matrix2MaterialSlot(kOutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output));
RemoveSlotsNameNotMatching(new[] { kOutputSlotId });
}
public string propertyName
{
get
{
return string.Format("{0}_{1}_Uniform", name, GetVariableNameForNode());
}
}
public override string GetVariableNameForSlot(int slotId)
{
return propertyName;
}
public void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode)
{
//if (exposedState == ExposedState.Exposed || generationMode.IsPreview())
// return;
visitor.AddShaderChunk(precision + "2 " + name + " = " + precision + "2x2 (" + m_Row0.x + ", " + m_Row0.y + ", " + m_Row1.x + ", " + m_Row1.y + ");", true);
}
[SerializeField]
string m_Description = string.Empty;
public string description
{
get
{
return string.IsNullOrEmpty(m_Description) ? name : m_Description;
}
set { m_Description = value; }
}
// TODO - Remove Property entries everywhere?
// Matrix cant be a shader property
/*public override PropertyType propertyType
{
get { return PropertyType.Matrix2; }
}*/
/*public override void GeneratePropertyBlock(PropertyGenerator visitor, GenerationMode generationMode)
{
if (exposedState == ExposedState.Exposed)
visitor.AddShaderProperty(new VectorPropertyChunk(propertyName, description, m_Value, PropertyChunk.HideState.Visible));
}*/
/*public override void GeneratePropertyUsages(ShaderGenerator visitor, GenerationMode generationMode)
{
if (exposedState == ExposedState.Exposed || generationMode.IsPreview())
visitor.AddShaderChunk(precision + "2 " + propertyName + ";", true);
}*/
/*public override PreviewProperty GetPreviewProperty()
{
return new PreviewProperty
{
m_Name = propertyName,
m_PropType = PropertyType.Vector2,
m_Vector2 = m_Value
};
}*/
}
}

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Matrix/Matrix2Node.cs.orig.meta


fileFormatVersion: 2
guid: 060d1826a682e4d4e9c45b4b4c93cb51
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

126
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Matrix/Matrix3Node.cs.orig


using UnityEditor.MaterialGraph.Drawing.Controls;
using UnityEngine.Graphing;
namespace UnityEngine.MaterialGraph
{
[Title("Input/Matrix/Matrix 3")]
public class Matrix3Node : AbstractMaterialNode, IGeneratesBodyCode
{
const int kOutputSlotId = 0;
const string kOutputSlotName = "Value";
[SerializeField]
Vector3 m_Row0;
[SerializeField]
Vector3 m_Row1;
[SerializeField]
Vector3 m_Row2;
[MultiFloatControl("", " ", " ", " ", " ")]
public Vector3 row0
{
get { return m_Row0; }
set { SetRow(ref m_Row0, value); }
}
[MultiFloatControl("", " ", " ", " ", " ")]
public Vector3 row1
{
get { return m_Row1; }
set { SetRow(ref m_Row1, value); }
}
[MultiFloatControl("", " ", " ", " ", " ")]
public Vector3 row2
{
get { return m_Row2; }
set { SetRow(ref m_Row2, value); }
}
void SetRow(ref Vector3 row, Vector3 value)
{
if (value == row)
return;
row = value;
if (onModified != null)
onModified(this, ModificationScope.Graph);
}
public Matrix3Node()
{
name = "Matrix3";
UpdateNodeAfterDeserialization();
}
public sealed override void UpdateNodeAfterDeserialization()
{
<<<<<<< HEAD:MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Matrix/Matrix3Node.cs
AddSlot(new MaterialSlot(kOutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, SlotValueType.Matrix3, Vector3.zero));
=======
AddSlot(new Matrix3MaterialSlot(kOutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output));
>>>>>>> exposed-prop-subgraph:MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Matrix/Matrix3Node.cs
RemoveSlotsNameNotMatching(new[] { kOutputSlotId });
}
public string propertyName
{
get { return string.Format("{0}_{1}_Uniform", name, GetVariableNameForNode()); }
}
public override string GetVariableNameForSlot(int slotId)
{
return propertyName;
}
public void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode)
{
//if (exposedState == ExposedState.Exposed || generationMode.IsPreview())
// return;
visitor.AddShaderChunk(precision + "3x3 " + propertyName + " = " + precision + "3x3 (" + m_Row0.x + ", " + m_Row0.y + ", " + m_Row0.z + ", " + m_Row1.x + ", " + m_Row1.y + ", " + m_Row1.z + ", " + m_Row2.x + ", " + m_Row2.y + ", " + m_Row2.z + ");", true);
}
[SerializeField]
string m_Description = string.Empty;
public string description
{
get
{
return string.IsNullOrEmpty(m_Description) ? name : m_Description;
}
set { m_Description = value; }
}
// TODO - Remove Property entries everywhere?
// Matrix cant be a shader property
/*public override PropertyType propertyType
{
get { return PropertyType.Matrix2; }
}*/
/*public override void GeneratePropertyBlock(PropertyGenerator visitor, GenerationMode generationMode)
{
if (exposedState == ExposedState.Exposed)
visitor.AddShaderProperty(new VectorPropertyChunk(propertyName, description, m_Value, PropertyChunk.HideState.Visible));
}*/
/*public override void GeneratePropertyUsages(ShaderGenerator visitor, GenerationMode generationMode)
{
if (exposedState == ExposedState.Exposed || generationMode.IsPreview())
visitor.AddShaderChunk(precision + "2 " + propertyName + ";", true);
}*/
/*public override PreviewProperty GetPreviewProperty()
{
return new PreviewProperty
{
m_Name = propertyName,
m_PropType = PropertyType.Vector2,
m_Vector3 = m_Value
};
}*/
}
}

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Matrix/Matrix3Node.cs.orig.meta


fileFormatVersion: 2
guid: c8c352d3b6e0d8548ae31d044b0266a8
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存