浏览代码

Fix Fog node

/main
Matt Dean 7 年前
当前提交
ec76d400
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 6
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/FogNode.cs

6
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/FogNode.cs


public void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode)
{
var colorValue = GetSlotValue(OutputSlotId, generationMode);
var densityValue = GetSlotValue(OutputSlot1Id, generationMode);
visitor.AddShaderChunk(string.Format("{0}(IN.{1}, {2}, {3});", GetFunctionName(), CoordinateSpace.Object.ToVariableName(InterpolatorType.Position), colorValue, densityValue), false);
visitor.AddShaderChunk(string.Format("{0}(IN.{1}, {2}, {3});", GetFunctionName(),
CoordinateSpace.Object.ToVariableName(InterpolatorType.Position),
GetVariableNameForSlot(OutputSlotId), GetVariableNameForSlot(OutputSlot1Id)), false);
}
public void GenerateNodeFunction(FunctionRegistry registry, GenerationMode generationMode)

正在加载...
取消
保存