예제 #1
0
 // Determine the variable type
 private string determineTypeIdentifier(Variable variable)
 {
     if (variable.IsFloat4())
         return "float4";
     else if (variable.IsFloat3())
         return "float3";
     else if (variable.IsFloat2())
         return "float2";
     else if (variable.IsFloat1())
         return "float";
     else
         return "float4";
 }
예제 #2
0
        // Determine the variable type
        private string determineTypeIdentifier(Variable variable)
        {
            if (variable.Node.inode.IsOutputNode() && variable.InputType == Variable.InputTypes.Link && variable.GetLinks().Count == 1)
            {
                return determineTypeIdentifier(variable.GetLinks()[0].OutputVariable);
            }

            if (variable.IsFloat4())
                return "float4";
            else if (variable.IsFloat3())
                return "float3";
            else if (variable.IsFloat2())
                return "float2";
            else if (variable.IsFloat1())
                return "float";
            else
                return "float4";
        }