internal override AbstractMaterialNode ToConcreteNode()
        {
            var node = new Vector4Node();

            node.FindInputSlot <Vector1MaterialSlot>(Vector4Node.InputSlotXId).value = value.x;
            node.FindInputSlot <Vector1MaterialSlot>(Vector4Node.InputSlotYId).value = value.y;
            node.FindInputSlot <Vector1MaterialSlot>(Vector4Node.InputSlotZId).value = value.z;
            node.FindInputSlot <Vector1MaterialSlot>(Vector4Node.InputSlotWId).value = value.w;
            return(node);
        }
Example #2
0
        protected override AbstractMaterialNode CreateNode(ShaderGraphBuilder builder, MaterialExpressionConstant4Vector unrealNode)
        {
            var node = new Vector4Node()
            {
                previewExpanded = false,
            };

            node.FindSlot <Vector1MaterialSlot>(Vector4Node.InputSlotXId).value = unrealNode.Constant.X;
            node.FindSlot <Vector1MaterialSlot>(Vector4Node.InputSlotYId).value = unrealNode.Constant.Y;
            node.FindSlot <Vector1MaterialSlot>(Vector4Node.InputSlotZId).value = unrealNode.Constant.Z;
            node.FindSlot <Vector1MaterialSlot>(Vector4Node.InputSlotWId).value = unrealNode.Constant.A;

            return(node);
        }