浏览代码

fix up typo.

/main
Tim Cooper 7 年前
当前提交
f2413918
共有 2 个文件被更改,包括 9 次插入2 次删除
  1. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Util/MatrixNames.cs
  2. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Util/ShaderGenerator.cs

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Util/MatrixNames.cs


public const string Model = "UNITY_MATRIX_M";
public const string ModelInverse = "UNITY_MATRIX_I_M";
public const string View = "UNITY_MATRIX_V";
public const string ViewInverse = "UNITY_MATRIX__I_V";
public const string ViewInverse = "UNITY_MATRIX_I_V";
public const string Projection = "UNITY_MATRIX_P";
public const string ViewProjection = "UNITY_MATRIX_VP";
public const string ModelView = "UNITY_MATRIX_MV";

}
}
}

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Util/ShaderGenerator.cs


public static string EmitTransform(TransformDesc[] matrices, TransformDesc[] invMatrices, string variable, bool isAffine, bool inverseTranspose)
{
// Use inverse transpose for situations where
// scale needs to be considered (normals)
if (isAffine)
{
variable = string.Format("float4({0},1.0)", variable);

{
matrix = "(float3x3)" + matrix;
}
// if the matrix is NOT a transpose type
// invert the order of multiplication
// it is implicit transpose.
if (m.transpose)
inverseTranspose = !inverseTranspose;
variable = inverseTranspose

正在加载...
取消
保存