浏览代码

Complete the 20 blending nodes.

Remove restriction of vector3.
/main
RinaldoTjan 8 年前
当前提交
0c2f7214
共有 3 个文件被更改,包括 12 次插入2 次删除
  1. 10
      MaterialGraphProject/Assets/Rinaldo/BlendModeNode.cs
  2. 2
      MaterialGraphProject/Assets/Rinaldo/BlendModesEnum.cs
  3. 2
      MaterialGraphProject/Assets/Rinaldo/Editor/BlendModeNodePresenter.cs

10
MaterialGraphProject/Assets/Rinaldo/BlendModeNode.cs


outputString.Deindent();
outputString.AddShaderChunk("}", false);
break;
case BlendModesEnum.PinLight:
outputString.AddShaderChunk(GetFunctionPrototype("arg1", "arg2"), false);
outputString.AddShaderChunk("{", false);
outputString.Indent();
outputString.AddShaderChunk(precision + outputDimension + " check = step (0.5, arg1);", false);
outputString.AddShaderChunk(precision + outputDimension + " result = check * max(2.0*(arg1 - 0.5), arg2);", false);
outputString.AddShaderChunk("return result += (1.0 - check) * min(2.0 * arg1,arg2);", false);
outputString.Deindent();
outputString.AddShaderChunk("}", false);
break;
case BlendModesEnum.Screen:
outputString.AddShaderChunk(GetFunctionPrototype("arg1", "arg2"), false);
outputString.AddShaderChunk("{", false);

2
MaterialGraphProject/Assets/Rinaldo/BlendModesEnum.cs


Multiply,
Negation,
Overlay,
// PinLight,
PinLight,
Screen,
SoftLight,
Substract,

2
MaterialGraphProject/Assets/Rinaldo/Editor/BlendModeNodePresenter.cs


if (cNode == null)
return;
cNode.blendMode = (BlendModesEnum)EditorGUILayout.EnumPopup("Mode", cNode.blendMode);
cNode.blendMode = (BlendModesEnum)EditorGUILayout.EnumPopup("", cNode.blendMode);
}
/* public override float GetHeight()

正在加载...
取消
保存