Ejemplo n.º 1
0
 protected override string ConcreteSlotValueAsVariable()
 {
     return(GradientUtil.GetGradientValue(value, ""));
 }
Ejemplo n.º 2
0
 public void GenerateNodeCode(ShaderStringBuilder sb, GraphContext graphContext, GenerationMode generationMode)
 {
     if (generationMode.IsPreview())
     {
         sb.AppendLine("Gradient {0} = {1};", GetVariableNameForSlot(outputSlotId), GradientUtil.GetGradientForPreview(GetVariableNameForNode()));
     }
     else
     {
         sb.AppendLine("Gradient {0} = {1}", GetVariableNameForSlot(outputSlotId), GradientUtil.GetGradientValue(gradient, ";"));
     }
 }