Repository: FlaxEngine/FlaxEngine
File: Source/Editor/Surface/Archetypes/Material.cs (C#)

Code before:
            Includes = 7,

            /// <summary>
            /// Default location after all shader resources and methods but before actual material code.
            /// </summary>
            Utilities = 8,

            /// <summary>
            /// Shader functions location after all material shaders.
            /// </summary>
            Shaders = 9,
        }

        /// <summary>
        /// The nodes for that group.
        /// </summary>
        public static NodeArchetype[] Nodes =
        {
            new NodeArchetype
            {
                TypeID = 1,
                Create = (id, context, arch, groupArch) => new SurfaceNodeMaterial(id, context, arch, groupArch),
                Title = "Material",
                Description = "Main material node",
                Flags = NodeFlags.MaterialGraph | NodeFlags.NoRemove | NodeFlags.NoSpawnViaGUI | NodeFlags.NoSpawnViaPaste | NodeFlags.NoCloseButton,
                Size = new Float2(180, 300),
                Elements = new[]
                {
                    NodeElementArchetype.Factory.Input(0, "", true, typeof(void), 0),
                    NodeElementArchetype.Factory.Input(1, "Color", true, typeof(Float3), 1),
                    NodeElementArchetype.Factory.Input(2, "Mask", true, typeof(float), 2),
                    NodeElementArchetype.Factory.Input(3, "Emissive", true, typeof(Float3), 3),
                    NodeElementArchetype.Factory.Input(4, "Metalness", true, typeof(float), 4),
                    NodeElementArchetype.Factory.Input(5, "Specular", true, typeof(float), 5),
                    NodeElementArchetype.Factory.Input(6, "Roughness", true, typeof(float), 6),
                    NodeElementArchetype.Factory.Input(7, "Ambient Occlusion", true, typeof(float), 7),
                    NodeElementArchetype.Factory.Input(8, "Normal", true, typeof(Float3), 8),
                    NodeElementArchetype.Factory.Input(9, "Opacity", true, typeof(float), 9),
                    NodeElementArchetype.Factory.Input(10, "Refraction", true, typeof(float), 10),
                    NodeElementArchetype.Factory.Input(11, "Position Offset", true, typeof(Float3), 11),
                    NodeElementArchetype.Factory.Input(12, "Tessellation Multiplier", true, typeof(float), 12),
                    NodeElementArchetype.Factory.Input(13, "World Displacement", true, typeof(Float3), 13),
                    NodeElementArchetype.Factory.Input(14, "Subsurface Color", true, typeof(Float3), 14),
                }
            },
            new NodeArchetype
            {
                TypeID = 2,
                Title = "World Position",
                Description = "Absolute world space position",
                Flags = NodeFlags.MaterialGraph,

Review comment (suggestion):
I know this is being increased for increased font reasons. You could make it more dynamic doing something like this: Style.Current.FontSmall.MeasureText("Tessellation Multiplier").X + 30. As then it should size with the font.

Code after:
            Includes = 7,

            /// <summary>
            /// Default location after all shader resources and methods but before actual material code.
            /// </summary>
            Utilities = 8,

            /// <summary>
            /// Shader functions location after all material shaders.
            /// </summary>
            Shaders = 9,
        }

        /// <summary>
        /// The nodes for that group.
        /// </summary>
        public static NodeArchetype[] Nodes =
        {
            new NodeArchetype
            {
                TypeID = 1,
                Create = (id, context, arch, groupArch) => new SurfaceNodeMaterial(id, context, arch, groupArch),
                Title = "Material",
                Description = "Main material node",
                Flags = NodeFlags.MaterialGraph | NodeFlags.NoRemove | NodeFlags.NoSpawnViaGUI | NodeFlags.NoSpawnViaPaste | NodeFlags.NoCloseButton,
                Size = new Float2(150, 300),
                Elements = new[]
                {
                    NodeElementArchetype.Factory.Input(0, "", true, typeof(void), 0),
                    NodeElementArchetype.Factory.Input(1, "Color", true, typeof(Float3), 1),
                    NodeElementArchetype.Factory.Input(2, "Mask", true, typeof(float), 2),
                    NodeElementArchetype.Factory.Input(3, "Emissive", true, typeof(Float3), 3),
                    NodeElementArchetype.Factory.Input(4, "Metalness", true, typeof(float), 4),
                    NodeElementArchetype.Factory.Input(5, "Specular", true, typeof(float), 5),
                    NodeElementArchetype.Factory.Input(6, "Roughness", true, typeof(float), 6),
                    NodeElementArchetype.Factory.Input(7, "Ambient Occlusion", true, typeof(float), 7),
                    NodeElementArchetype.Factory.Input(8, "Normal", true, typeof(Float3), 8),
                    NodeElementArchetype.Factory.Input(9, "Opacity", true, typeof(float), 9),
                    NodeElementArchetype.Factory.Input(10, "Refraction", true, typeof(float), 10),
                    NodeElementArchetype.Factory.Input(11, "Position Offset", true, typeof(Float3), 11),
                    NodeElementArchetype.Factory.Input(12, "Tessellation Multiplier", true, typeof(float), 12),
                    NodeElementArchetype.Factory.Input(13, "World Displacement", true, typeof(Float3), 13),
                    NodeElementArchetype.Factory.Input(14, "Subsurface Color", true, typeof(Float3), 14),
                }
            },
            new NodeArchetype
            {
                TypeID = 2,
                Title = "World Position",
                Description = "Absolute world space position",
                Flags = NodeFlags.MaterialGraph,