예제 #1
0
        public BocsNodeGradientTexture()
        {
            //NodeType* type = NodeType::add("gradient_texture", create, NodeType::SHADER);

            //TEXTURE_MAPPING_DEFINE(GradientTextureNode);

            //static NodeEnum type_enum;
            //type_enum.insert("linear", NODE_BLEND_LINEAR);
            //type_enum.insert("quadratic", NODE_BLEND_QUADRATIC);
            //type_enum.insert("easing", NODE_BLEND_EASING);
            //type_enum.insert("diagonal", NODE_BLEND_DIAGONAL);
            //type_enum.insert("radial", NODE_BLEND_RADIAL);
            //type_enum.insert("quadratic_sphere", NODE_BLEND_QUADRATIC_SPHERE);
            //type_enum.insert("spherical", NODE_BLEND_SPHERICAL);
            //SOCKET_ENUM(type, "Type", type_enum, NODE_BLEND_LINEAR);

            //SOCKET_IN_POINT(vector, "Vector", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_TEXTURE_GENERATED);

            //SOCKET_OUT_COLOR(color, "Color");
            //SOCKET_OUT_FLOAT(fac, "Fac");

            NodeTitle = "Gradient Texture";
            NodeName  = "gradient_texture";

            Slots.Add(new BocsSlotClosure(this, "Color", "color", BocsSlotBase.BocsSlotType.Output));
            Slots.Add(new BocsSlotFloat(this, "Fac", "fac", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "type", "type", BocsSlotBase.BocsSlotType.Value, 0);

            bsl.List = new string[] { "linear", "quadratic", "easing", "diagonal", "radial", "quadratic_sphere", "spherical" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotClosure(this, "Vector", "vector", BocsSlotBase.BocsSlotType.Input));
        }
예제 #2
0
        public BocsNodeTangent()
        {
            //NodeType* type = NodeType::add("tangent", create, NodeType::SHADER);

            //static NodeEnum direction_type_enum;
            //direction_type_enum.insert("radial", NODE_TANGENT_RADIAL);
            //direction_type_enum.insert("uv_map", NODE_TANGENT_UVMAP);
            //SOCKET_ENUM(direction_type, "Direction Type", direction_type_enum, NODE_TANGENT_RADIAL);

            //static NodeEnum axis_enum;
            //axis_enum.insert("x", NODE_TANGENT_AXIS_X);
            //axis_enum.insert("y", NODE_TANGENT_AXIS_Y);
            //axis_enum.insert("z", NODE_TANGENT_AXIS_Z);
            //SOCKET_ENUM(axis, "Axis", axis_enum, NODE_TANGENT_AXIS_X);

            //SOCKET_STRING(attribute, "Attribute", ustring(""));

            //SOCKET_IN_NORMAL(normal_osl, "NormalIn", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL | SocketType::OSL_INTERNAL);
            //SOCKET_OUT_NORMAL(tangent, "Tangent");

            NodeTitle = "Tangent";
            NodeName  = "tangent";

            Slots.Add(new BocsSlotClosure(this, "Tangent", "tangent", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "direction_type", "direction_type", BocsSlotBase.BocsSlotType.Value, 0);

            bsl.List = new string[] { "radial", "uv_map" };
            Slots.Add(bsl);

            BocsSlotStringList bsl2 = new BocsSlotStringList(this, "axis", "axis", BocsSlotBase.BocsSlotType.Value, 0);

            bsl2.List = new string[] { "x", "y", "z" };
            Slots.Add(bsl2);
        }
예제 #3
0
        public BocsNodeVoronoiTexture()
        {
            //NodeType* type = NodeType::add("voronoi_texture", create, NodeType::SHADER);

            //TEXTURE_MAPPING_DEFINE(VoronoiTextureNode);

            //static NodeEnum coloring_enum;
            //coloring_enum.insert("intensity", NODE_VORONOI_INTENSITY);
            //coloring_enum.insert("cells", NODE_VORONOI_CELLS);
            //SOCKET_ENUM(coloring, "Coloring", coloring_enum, NODE_VORONOI_INTENSITY);

            //SOCKET_IN_FLOAT(scale, "Scale", 1.0f);
            //SOCKET_IN_POINT(vector, "Vector", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_TEXTURE_GENERATED);

            //SOCKET_OUT_COLOR(color, "Color");
            //SOCKET_OUT_FLOAT(fac, "Fac");

            NodeTitle = "Voronoi Texture";
            NodeName  = "voronoi_texture";

            Slots.Add(new BocsSlotClosure(this, "Color", "color", BocsSlotBase.BocsSlotType.Output));
            Slots.Add(new BocsSlotClosure(this, "Fac", "fac", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "coloring", "coloring", BocsSlotBase.BocsSlotType.Value, 0);

            bsl.List = new string[] { "intensity", "cells" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotClosure(this, "Vector", "vector", BocsSlotBase.BocsSlotType.Input));
            Slots.Add(new BocsSlotFloat(this, "Scale", "scale", BocsSlotBase.BocsSlotType.Input, 1));
        }
예제 #4
0
        public BocsNodeVectorMath()
        {
            //NodeType* type = NodeType::add("vector_math", create, NodeType::SHADER);

            //static NodeEnum type_enum;
            //type_enum.insert("add", NODE_VECTOR_MATH_ADD);
            //type_enum.insert("subtract", NODE_VECTOR_MATH_SUBTRACT);
            //type_enum.insert("average", NODE_VECTOR_MATH_AVERAGE);
            //type_enum.insert("dot_product", NODE_VECTOR_MATH_DOT_PRODUCT);
            //type_enum.insert("cross_product", NODE_VECTOR_MATH_CROSS_PRODUCT);
            //type_enum.insert("normalize", NODE_VECTOR_MATH_NORMALIZE);
            //SOCKET_ENUM(type, "Type", type_enum, NODE_VECTOR_MATH_ADD);

            //SOCKET_IN_VECTOR(vector1, "Vector1", make_float3(0.0f, 0.0f, 0.0f));
            //SOCKET_IN_VECTOR(vector2, "Vector2", make_float3(0.0f, 0.0f, 0.0f));

            //SOCKET_OUT_FLOAT(value, "Value");
            //SOCKET_OUT_VECTOR(vector, "Vector");

            NodeTitle = "Vector Math";
            NodeName  = "vector_math";

            Slots.Add(new BocsSlotClosure(this, "Vector", "vector", BocsSlotBase.BocsSlotType.Output));
            Slots.Add(new BocsSlotClosure(this, "Value", "value", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "type", "type", BocsSlotBase.BocsSlotType.Value, 0);

            bsl.List = new string[] { "add", "subtract", "average", "dot_product", "cross_product", "normalize" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotVector3(this, "Vector", "vector1", BocsSlotBase.BocsSlotType.Input));
            Slots.Add(new BocsSlotVector3(this, "Vector", "vector2", BocsSlotBase.BocsSlotType.Input));
        }
예제 #5
0
        public BocsNodeEnviromentTexture()
        {
            //NodeType* type = NodeType::add("environment_texture", create, NodeType::SHADER);

            //TEXTURE_MAPPING_DEFINE(EnvironmentTextureNode);

            //SOCKET_STRING(filename, "Filename", ustring(""));

            //static NodeEnum color_space_enum;
            //color_space_enum.insert("none", NODE_COLOR_SPACE_NONE);
            //color_space_enum.insert("color", NODE_COLOR_SPACE_COLOR);
            //SOCKET_ENUM(color_space, "Color Space", color_space_enum, NODE_COLOR_SPACE_COLOR);

            //SOCKET_BOOLEAN(use_alpha, "Use Alpha", true);

            //static NodeEnum interpolation_enum;
            //interpolation_enum.insert("closest", INTERPOLATION_CLOSEST);
            //interpolation_enum.insert("linear", INTERPOLATION_LINEAR);
            //interpolation_enum.insert("cubic", INTERPOLATION_CUBIC);
            //interpolation_enum.insert("smart", INTERPOLATION_SMART);
            //SOCKET_ENUM(interpolation, "Interpolation", interpolation_enum, INTERPOLATION_LINEAR);

            //static NodeEnum projection_enum;
            //projection_enum.insert("equirectangular", NODE_ENVIRONMENT_EQUIRECTANGULAR);
            //projection_enum.insert("mirror_ball", NODE_ENVIRONMENT_MIRROR_BALL);
            //SOCKET_ENUM(projection, "Projection", projection_enum, NODE_ENVIRONMENT_EQUIRECTANGULAR);

            //SOCKET_IN_POINT(vector, "Vector", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_POSITION);

            //SOCKET_OUT_COLOR(color, "Color");
            //SOCKET_OUT_FLOAT(alpha, "Alpha");

            NodeTitle = "Enviroment Texture";
            NodeName  = "environment_texture";

            Slots.Add(new BocsSlotClosure(this, "Color", "color", BocsSlotBase.BocsSlotType.Output));
            Slots.Add(new BocsSlotClosure(this, "Alpha", "alpha", BocsSlotBase.BocsSlotType.Output));

            Slots.Add(new BocsSlotTexture(this, "Image", "filename", BocsSlotBase.BocsSlotType.Value));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "color_space", "color_space", BocsSlotBase.BocsSlotType.Value, 1);

            bsl.List = new string[] { "none", "color" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotBool(this, "Use Alpha", "use_alpha", BocsSlotBase.BocsSlotType.Value, true));

            BocsSlotStringList bsl1 = new BocsSlotStringList(this, "interpolation", "interpolation", BocsSlotBase.BocsSlotType.Value, 1);

            bsl1.List = new string[] { "closest", "linear", "cubic", "smart" };
            Slots.Add(bsl1);

            BocsSlotStringList bsl2 = new BocsSlotStringList(this, "projection", "projection", BocsSlotBase.BocsSlotType.Value, 0);

            bsl2.List = new string[] { "equirectangular", "mirror_ball" };
            Slots.Add(bsl2);

            Slots.Add(new BocsSlotClosure(this, "Vector", "vector", BocsSlotBase.BocsSlotType.Input));
        }
예제 #6
0
        public BocsNodeMixRGB()
        {
            //NodeType* type = NodeType::add("mix", create, NodeType::SHADER);

            //static NodeEnum type_enum;
            //type_enum.insert("mix", NODE_MIX_BLEND);
            //type_enum.insert("add", NODE_MIX_ADD);
            //type_enum.insert("multiply", NODE_MIX_MUL);
            //type_enum.insert("screen", NODE_MIX_SCREEN);
            //type_enum.insert("overlay", NODE_MIX_OVERLAY);
            //type_enum.insert("subtract", NODE_MIX_SUB);
            //type_enum.insert("divide", NODE_MIX_DIV);
            //type_enum.insert("difference", NODE_MIX_DIFF);
            //type_enum.insert("darken", NODE_MIX_DARK);
            //type_enum.insert("lighten", NODE_MIX_LIGHT);
            //type_enum.insert("dodge", NODE_MIX_DODGE);
            //type_enum.insert("burn", NODE_MIX_BURN);
            //type_enum.insert("hue", NODE_MIX_HUE);
            //type_enum.insert("saturation", NODE_MIX_SAT);
            //type_enum.insert("value", NODE_MIX_VAL);
            //type_enum.insert("color", NODE_MIX_COLOR);
            //type_enum.insert("soft_light", NODE_MIX_SOFT);
            //type_enum.insert("linear_light", NODE_MIX_LINEAR);
            //SOCKET_ENUM(type, "Type", type_enum, NODE_MIX_BLEND);

            //SOCKET_BOOLEAN(use_clamp, "Use Clamp", false);

            //SOCKET_IN_FLOAT(fac, "Fac", 0.5f);
            //SOCKET_IN_COLOR(color1, "Color1", make_float3(0.0f, 0.0f, 0.0f));
            //SOCKET_IN_COLOR(color2, "Color2", make_float3(0.0f, 0.0f, 0.0f));

            //SOCKET_OUT_COLOR(color, "Color");

            NodeTitle = "Mix";
            NodeName  = "mix";

            Slots.Add(new BocsSlotClosure(this, "Color", "color", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "type", "type", BocsSlotBase.BocsSlotType.Value, 0);

            bsl.List = new string[] { "mix", "add", "multiply", "screen", "overlay", "subtract", "divide", "difference", "darken", "lighten", "dodge", "burn", "hue", "saturation", "value", "color", "soft_light", "linear_light" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotBool(this, "Clamp", "use_clamp", BocsSlotBase.BocsSlotType.Value, false));

            Slots.Add(new BocsSlotFloat(this, "Fac", "fac", BocsSlotBase.BocsSlotType.Input, .5f));
            Slots.Add(new BocsSlotColor(this, "Color1", "color1", BocsSlotBase.BocsSlotType.Input));
            Slots.Add(new BocsSlotColor(this, "Color2", "color2", BocsSlotBase.BocsSlotType.Input));
        }
예제 #7
0
        public BocsNodeMath()
        {
            //NodeType* type = NodeType::add("math", create, NodeType::SHADER);

            //static NodeEnum type_enum;
            //type_enum.insert("add", NODE_MATH_ADD);
            //type_enum.insert("subtract", NODE_MATH_SUBTRACT);
            //type_enum.insert("multiply", NODE_MATH_MULTIPLY);
            //type_enum.insert("divide", NODE_MATH_DIVIDE);
            //type_enum.insert("sine", NODE_MATH_SINE);
            //type_enum.insert("cosine", NODE_MATH_COSINE);
            //type_enum.insert("tangent", NODE_MATH_TANGENT);
            //type_enum.insert("arcsine", NODE_MATH_ARCSINE);
            //type_enum.insert("arccosine", NODE_MATH_ARCCOSINE);
            //type_enum.insert("arctangent", NODE_MATH_ARCTANGENT);
            //type_enum.insert("power", NODE_MATH_POWER);
            //type_enum.insert("logarithm", NODE_MATH_LOGARITHM);
            //type_enum.insert("minimum", NODE_MATH_MINIMUM);
            //type_enum.insert("maximum", NODE_MATH_MAXIMUM);
            //type_enum.insert("round", NODE_MATH_ROUND);
            //type_enum.insert("less_than", NODE_MATH_LESS_THAN);
            //type_enum.insert("greater_than", NODE_MATH_GREATER_THAN);
            //type_enum.insert("modulo", NODE_MATH_MODULO);
            //type_enum.insert("absolute", NODE_MATH_ABSOLUTE);
            //SOCKET_ENUM(type, "Type", type_enum, NODE_MATH_ADD);

            //SOCKET_BOOLEAN(use_clamp, "Use Clamp", false);

            //SOCKET_IN_FLOAT(value1, "Value1", 0.0f);
            //SOCKET_IN_FLOAT(value2, "Value2", 0.0f);

            //SOCKET_OUT_FLOAT(value, "Value");

            NodeTitle = "Math";
            NodeName  = "math";

            Slots.Add(new BocsSlotClosure(this, "Value", "value", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "type", "type", BocsSlotBase.BocsSlotType.Value, 0);

            bsl.List = new string[] { "add", "subtract", "multiply", "divide", "sine", "cosine", "tangent", "arcsine", "arccosine", "arctangent", "power", "logarithm", "minimum", "maximum", "round", "less_than", "greater_than", "modulo", "absolute" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotBool(this, "Clamp", "use_clamp", BocsSlotBase.BocsSlotType.Value, false));

            Slots.Add(new BocsSlotFloat(this, "Value", "value1", BocsSlotBase.BocsSlotType.Input, 0));
            Slots.Add(new BocsSlotFloat(this, "Value", "value2", BocsSlotBase.BocsSlotType.Input, 0));
        }
예제 #8
0
        public BocsNodeWaveTexture()
        {
            //NodeType* type = NodeType::add("wave_texture", create, NodeType::SHADER);

            //TEXTURE_MAPPING_DEFINE(WaveTextureNode);

            //static NodeEnum type_enum;
            //type_enum.insert("bands", NODE_WAVE_BANDS);
            //type_enum.insert("rings", NODE_WAVE_RINGS);
            //SOCKET_ENUM(type, "Type", type_enum, NODE_WAVE_BANDS);

            //static NodeEnum profile_enum;
            //profile_enum.insert("sine", NODE_WAVE_PROFILE_SIN);
            //profile_enum.insert("saw", NODE_WAVE_PROFILE_SAW);
            //SOCKET_ENUM(profile, "Profile", profile_enum, NODE_WAVE_PROFILE_SIN);

            //SOCKET_IN_FLOAT(scale, "Scale", 1.0f);
            //SOCKET_IN_FLOAT(distortion, "Distortion", 0.0f);
            //SOCKET_IN_FLOAT(detail, "Detail", 2.0f);
            //SOCKET_IN_FLOAT(detail_scale, "Detail Scale", 0.0f);
            //SOCKET_IN_POINT(vector, "Vector", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_TEXTURE_GENERATED);

            //SOCKET_OUT_COLOR(color, "Color");
            //SOCKET_OUT_FLOAT(fac, "Fac");

            NodeTitle = "Wave Texture";
            NodeName  = "wave_texture";

            Slots.Add(new BocsSlotClosure(this, "Color", "color", BocsSlotBase.BocsSlotType.Output));
            Slots.Add(new BocsSlotClosure(this, "Fac", "fac", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl1 = new BocsSlotStringList(this, "type", "type", BocsSlotBase.BocsSlotType.Value, 0);

            bsl1.List = new string[] { "bands", "rings" };
            Slots.Add(bsl1);

            BocsSlotStringList bsl2 = new BocsSlotStringList(this, "profile", "profile", BocsSlotBase.BocsSlotType.Value, 0);

            bsl2.List = new string[] { "sine", "saw" };
            Slots.Add(bsl2);

            Slots.Add(new BocsSlotClosure(this, "Vector", "vector", BocsSlotBase.BocsSlotType.Input));

            Slots.Add(new BocsSlotFloat(this, "Scale", "scale", BocsSlotBase.BocsSlotType.Input, 1));
            Slots.Add(new BocsSlotFloat(this, "Distortion", "distortion", BocsSlotBase.BocsSlotType.Input, 0));
            Slots.Add(new BocsSlotFloat(this, "Detail", "detail", BocsSlotBase.BocsSlotType.Input, 2));
            Slots.Add(new BocsSlotFloat(this, "Detail Scale", "detail_scale", BocsSlotBase.BocsSlotType.Input, 0));
        }
        public BocsNodeMusgraveTexture()
        {
            //NodeType* type = NodeType::add("musgrave_texture", create, NodeType::SHADER);

            //TEXTURE_MAPPING_DEFINE(MusgraveTextureNode);

            //static NodeEnum type_enum;
            //type_enum.insert("multifractal", NODE_MUSGRAVE_MULTIFRACTAL);
            //type_enum.insert("fBM", NODE_MUSGRAVE_FBM);
            //type_enum.insert("hybrid_multifractal", NODE_MUSGRAVE_HYBRID_MULTIFRACTAL);
            //type_enum.insert("ridged_multifractal", NODE_MUSGRAVE_RIDGED_MULTIFRACTAL);
            //type_enum.insert("hetero_terrain", NODE_MUSGRAVE_HETERO_TERRAIN);
            //SOCKET_ENUM(type, "Type", type_enum, NODE_MUSGRAVE_FBM);

            //SOCKET_IN_FLOAT(scale, "Scale", 1.0f);
            //SOCKET_IN_FLOAT(detail, "Detail", 2.0f);
            //SOCKET_IN_FLOAT(dimension, "Dimension", 2.0f);
            //SOCKET_IN_FLOAT(lacunarity, "Lacunarity", 1.0f);
            //SOCKET_IN_FLOAT(offset, "Offset", 0.0f);
            //SOCKET_IN_FLOAT(gain, "Gain", 1.0f);
            //SOCKET_IN_POINT(vector, "Vector", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_TEXTURE_GENERATED);

            //SOCKET_OUT_COLOR(color, "Color");
            //SOCKET_OUT_FLOAT(fac, "Fac");

            NodeTitle = "Musgrave Texture";
            NodeName  = "musgrave_texture";

            Slots.Add(new BocsSlotClosure(this, "Color", "color", BocsSlotBase.BocsSlotType.Output));
            Slots.Add(new BocsSlotClosure(this, "Fac", "fac", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "type", "type", BocsSlotBase.BocsSlotType.Value, 0);

            bsl.List = new string[] { "fBM", "Multifractal", "hybrid_multifractal", "ridged_multifractal", "hetero_terrain" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotClosure(this, "Vector", "Vector", BocsSlotBase.BocsSlotType.Input));

            Slots.Add(new BocsSlotFloat(this, "Scale", "scale", BocsSlotBase.BocsSlotType.Input, 1));
            Slots.Add(new BocsSlotFloat(this, "Detail", "detail", BocsSlotBase.BocsSlotType.Input, 2));
            Slots.Add(new BocsSlotFloat(this, "Dimension", "dimension", BocsSlotBase.BocsSlotType.Input, 2));
            Slots.Add(new BocsSlotFloat(this, "Lacunarity", "lacunarity", BocsSlotBase.BocsSlotType.Input, 1));
            Slots.Add(new BocsSlotFloat(this, "Offset", "offset", BocsSlotBase.BocsSlotType.Input, 0));
            Slots.Add(new BocsSlotFloat(this, "Gain", "gain", BocsSlotBase.BocsSlotType.Input, 1));
        }
        public BocsNodeVectorTransform()
        {
            //NodeType* type = NodeType::add("vector_transform", create, NodeType::SHADER);

            //static NodeEnum type_enum;
            //type_enum.insert("vector", NODE_VECTOR_TRANSFORM_TYPE_VECTOR);
            //type_enum.insert("point", NODE_VECTOR_TRANSFORM_TYPE_POINT);
            //type_enum.insert("normal", NODE_VECTOR_TRANSFORM_TYPE_NORMAL);
            //SOCKET_ENUM(type, "Type", type_enum, NODE_VECTOR_TRANSFORM_TYPE_VECTOR);

            //static NodeEnum space_enum;
            //space_enum.insert("world", NODE_VECTOR_TRANSFORM_CONVERT_SPACE_WORLD);
            //space_enum.insert("object", NODE_VECTOR_TRANSFORM_CONVERT_SPACE_OBJECT);
            //space_enum.insert("camera", NODE_VECTOR_TRANSFORM_CONVERT_SPACE_CAMERA);
            //SOCKET_ENUM(convert_from, "Convert From", space_enum, NODE_VECTOR_TRANSFORM_CONVERT_SPACE_WORLD);
            //SOCKET_ENUM(convert_to, "Convert To", space_enum, NODE_VECTOR_TRANSFORM_CONVERT_SPACE_OBJECT);

            //SOCKET_IN_VECTOR(vector, "Vector", make_float3(0.0f, 0.0f, 0.0f));
            //SOCKET_OUT_VECTOR(vector, "Vector");

            NodeTitle = "Vector Transform";
            NodeName  = "vector_transform";

            Slots.Add(new BocsSlotClosure(this, "Vector", "vector", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "type", "type", BocsSlotBase.BocsSlotType.Value, 0);

            bsl.List = new string[] { "vector", "point", "normal" };
            Slots.Add(bsl);

            BocsSlotStringList bsl1 = new BocsSlotStringList(this, "convert_from", "convert_from", BocsSlotBase.BocsSlotType.Value, 0);

            bsl1.List = new string[] { "world", "object", "camera" };
            Slots.Add(bsl1);

            BocsSlotStringList bsl2 = new BocsSlotStringList(this, "convert_to", "convert_to", BocsSlotBase.BocsSlotType.Value, 0);

            bsl2.List = new string[] { "object", "world", "camera" };
            Slots.Add(bsl2);

            Slots.Add(new BocsSlotVector3(this, "Vector", "vector", BocsSlotBase.BocsSlotType.Input));
        }
예제 #11
0
        public BocsNodeTexture()
        {
            NodeTitle = "Image Texture";
            NodeName  = "image_texture";

            //Outputs...
            Slots.Add(new BocsSlotClosure(this, "Color", "color", BocsSlotBase.BocsSlotType.Output));
            Slots.Add(new BocsSlotClosure(this, "Alpha", "alpha", BocsSlotBase.BocsSlotType.Output));

            //Options...
            Slots.Add(new BocsSlotTexture(this, "Image", "filename", BocsSlotBase.BocsSlotType.Value));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "color_space", "color_space", BocsSlotBase.BocsSlotType.Value, 1);

            bsl.List = new string[] { "none", "color" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotBool(this, "Use Alpha", "use_alpha", BocsSlotBase.BocsSlotType.Value, true));

            BocsSlotStringList bsl1 = new BocsSlotStringList(this, "interpolation", "interpolation", BocsSlotBase.BocsSlotType.Value, 1);

            bsl1.List = new string[] { "closest", "linear", "cubic", "smart" };
            Slots.Add(bsl1);

            BocsSlotStringList bsl2 = new BocsSlotStringList(this, "extension", "extension", BocsSlotBase.BocsSlotType.Value, 0);

            bsl2.List = new string[] { "periodic", "clamp", "black" };
            Slots.Add(bsl2);

            BocsSlotStringList bsl3 = new BocsSlotStringList(this, "projection", "projection", BocsSlotBase.BocsSlotType.Value, 0);

            bsl3.List = new string[] { "flat", "box", "sphere", "tube" };
            Slots.Add(bsl3);

            //_slots.Add(new BocsSlotFloat(this,"Blend","projection_blend",BocsSlotBase.BocsSlotType.Value,0));

            //Inputs...
            Slots.Add(new BocsSlotClosure(this, "Vector", "vector", BocsSlotBase.BocsSlotType.Input));
        }
예제 #12
0
        public BocsNodeMapping()
        {
            //NodeType* type = NodeType::add("mapping", create, NodeType::SHADER);

            //TEXTURE_MAPPING_DEFINE(MappingNode);

            //SOCKET_IN_POINT(vector, "Vector", make_float3(0.0f, 0.0f, 0.0f));
            //SOCKET_OUT_POINT(vector, "Vector");

            //SOCKET_POINT(tex_mapping.translation, "Translation", make_float3(0.0f, 0.0f, 0.0f)); \
            //SOCKET_VECTOR(tex_mapping.rotation, "Rotation", make_float3(0.0f, 0.0f, 0.0f));      \
            //SOCKET_VECTOR(tex_mapping.scale, "Scale", make_float3(1.0f, 1.0f, 1.0f));            \
            //\
            //SOCKET_VECTOR(tex_mapping.min, "Min", make_float3(-FLT_MAX, -FLT_MAX, -FLT_MAX)); \
            //SOCKET_VECTOR(tex_mapping.max, "Max", make_float3(FLT_MAX, FLT_MAX, FLT_MAX));    \
            //SOCKET_BOOLEAN(tex_mapping.use_minmax, "Use Min Max", false);                     \
            //\
            //static NodeEnum mapping_axis_enum;                      \
            //mapping_axis_enum.insert("none", TextureMapping::NONE); \
            //mapping_axis_enum.insert("x", TextureMapping::X);       \
            //mapping_axis_enum.insert("y", TextureMapping::Y);       \
            //mapping_axis_enum.insert("z", TextureMapping::Z);       \
            //SOCKET_ENUM(tex_mapping.x_mapping, "x_mapping", mapping_axis_enum, TextureMapping::X); \
            //SOCKET_ENUM(tex_mapping.y_mapping, "y_mapping", mapping_axis_enum, TextureMapping::Y); \
            //SOCKET_ENUM(tex_mapping.z_mapping, "z_mapping", mapping_axis_enum, TextureMapping::Z); \
            //\
            //static NodeEnum mapping_type_enum;                            \
            //mapping_type_enum.insert("point", TextureMapping::POINT);     \
            //mapping_type_enum.insert("texture", TextureMapping::TEXTURE); \
            //mapping_type_enum.insert("vector", TextureMapping::VECTOR);   \
            //mapping_type_enum.insert("normal", TextureMapping::NORMAL);   \
            //SOCKET_ENUM(tex_mapping.type, "Type", mapping_type_enum, TextureMapping::TEXTURE); \
            //\
            //static NodeEnum mapping_projection_enum;                                                \
            //mapping_projection_enum.insert("flat", TextureMapping::FLAT);                           \
            //mapping_projection_enum.insert("cube", TextureMapping::CUBE);                           \
            //mapping_projection_enum.insert("tube", TextureMapping::TUBE);                           \
            //mapping_projection_enum.insert("sphere", TextureMapping::SPHERE);                       \
            //SOCKET_ENUM(tex_mapping.projection, "Projection", mapping_projection_enum, TextureMapping::FLAT);

            NodeTitle = "Mapping";
            NodeName  = "mapping";

            Slots.Add(new BocsSlotClosure(this, "Vector", "vector", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "tex_mapping.type", "tex_mapping.type", BocsSlotBase.BocsSlotType.Value, 1);

            bsl.List = new string[] { "texture", "point", "vector", "normal" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotVector3(this, "Translation", "tex_mapping.translation", BocsSlotBase.BocsSlotType.Value));
            Slots.Add(new BocsSlotVector3(this, "Rotation", "tex_mapping.rotation", BocsSlotBase.BocsSlotType.Value));
            Slots.Add(new BocsSlotVector3(this, "Scale", "tex_mapping.scale", BocsSlotBase.BocsSlotType.Value));

            //BocsSlotStringList bsl1 = new BocsSlotStringList(this, "convert_from", "convert_from", BocsSlotBase.BocsSlotType.Value, 0);
            //bsl1._list = new string[] { "world", "object", "camera" };
            //_slots.Add(bsl1);

            //BocsSlotStringList bsl2 = new BocsSlotStringList(this, "convert_to", "convert_to", BocsSlotBase.BocsSlotType.Value, 0);
            //bsl2._list = new string[] { "object", "world", "camera" };
            //_slots.Add(bsl2);

            Slots.Add(new BocsSlotVector3(this, "Vector", "vector", BocsSlotBase.BocsSlotType.Input));

            //NodeType* type = NodeType::add("vector_transform", create, NodeType::SHADER);

            //static NodeEnum type_enum;
            //type_enum.insert("vector", NODE_VECTOR_TRANSFORM_TYPE_VECTOR);
            //type_enum.insert("point", NODE_VECTOR_TRANSFORM_TYPE_POINT);
            //type_enum.insert("normal", NODE_VECTOR_TRANSFORM_TYPE_NORMAL);
            //SOCKET_ENUM(type, "Type", type_enum, NODE_VECTOR_TRANSFORM_TYPE_VECTOR);

            //static NodeEnum space_enum;
            //space_enum.insert("world", NODE_VECTOR_TRANSFORM_CONVERT_SPACE_WORLD);
            //space_enum.insert("object", NODE_VECTOR_TRANSFORM_CONVERT_SPACE_OBJECT);
            //space_enum.insert("camera", NODE_VECTOR_TRANSFORM_CONVERT_SPACE_CAMERA);
            //SOCKET_ENUM(convert_from, "Convert From", space_enum, NODE_VECTOR_TRANSFORM_CONVERT_SPACE_WORLD);
            //SOCKET_ENUM(convert_to, "Convert To", space_enum, NODE_VECTOR_TRANSFORM_CONVERT_SPACE_OBJECT);

            //SOCKET_IN_VECTOR(vector, "Vector", make_float3(0.0f, 0.0f, 0.0f));
            //SOCKET_OUT_VECTOR(vector, "Vector");
        }