Beispiel #1
0
 def get_inputs(self) -> typing.List[ShaderInputParameter]:
     return [
         ShaderInputParameter("Mortar Scale", "mortar_scale",
                              DataType.Float, (0.0, 1.0), 0.85),
         ShaderInputParameter("Brick Scale", "brick_scale", DataType.Float,
                              (0.0, 100.0), 10.0)
     ]
Beispiel #2
0
 def get_inputs(self) -> typing.List[ShaderInputParameter]:
     return [
         ShaderInputParameter("Scale", "scale", DataType.Vec3_Float,
                              (0, 100), torch.tensor((1., 1., 1.))),
         ShaderInputParameter("Shift", "shift", DataType.Vec3_Float, (0, 1),
                              torch.tensor((0., 0.)))
     ]
Beispiel #3
0
 def get_inputs(self) -> typing.List[ShaderInputParameter]:
     return [
         ShaderInputParameter("Red", "red", DataType.Float, (0, 1), 0.0),
         ShaderInputParameter("Green", "green", DataType.Float, (0, 1),
                              0.0),
         ShaderInputParameter("Blue", "blue", DataType.Float, (0, 1), 0.0)
     ]
Beispiel #4
0
 def get_inputs(self) -> typing.List[ShaderInputParameter]:
     return [
         ShaderInputParameter("X", "x", DataType.Vec3_RGB, (0, 1),
                              torch.tensor((1.0, 1.0, 1.0))),
         ShaderInputParameter("Y", "y", DataType.Vec3_RGB, (0, 1),
                              torch.tensor((0.0, 0.0, 0.0))),
         ShaderInputParameter("Factor", "a", DataType.Float, (0, 1), 0.5)
     ]
Beispiel #5
0
 def get_inputs(self) -> typing.List[ShaderInputParameter]:
     return [
         ShaderInputParameter("Scalar", "scalar", DataType.Float,
                              FLOAT_INTERVAL, 0.0),
         ShaderInputParameter("Multiply", "mul", DataType.Float,
                              FLOAT_INTERVAL, 1.0),
         ShaderInputParameter("Add", "add", DataType.Float, FLOAT_INTERVAL,
                              0.0)
     ]
Beispiel #6
0
 def get_inputs(self) -> typing.List[ShaderInputParameter]:
     return [
         ShaderInputParameter("Scale", "scale", DataType.Float, (0, 100),
                              1.0),
         ShaderInputParameter("Detail",
                              "detail",
                              DataType.Int, (0, 10),
                              4.0,
                              force_scalar=True)
     ]
Beispiel #7
0
 def get_inputs(self) -> typing.List[ShaderInputParameter]:
     return [
         ShaderInputParameter(
             "Operation",
             "operation",
             DataType.Int_Choice, (0, 3),
             0,
             force_scalar=True,
             names=["Add", "Subtract", "Multiply", "Divide"]),
         ShaderInputParameter("Vector", "vector", DataType.Vec3_Float,
                              (0, 1), torch.tensor((0., 0., 0.))),
         ShaderInputParameter("Value", "value",
                              DataType.Vec3_Float, (-10000, 10000),
                              torch.tensor((1.0, 1.0, 1.0))),
     ]
Beispiel #8
0
 def __init__(self, si: ShaderInputParameter, value: torch.Tensor):
     super().__init__(si.get_display_label(), si.get_argument(), si.dtype(), si.get_limits(),
                      si.get_default(), connectable=si.is_connectable(), force_scalar=si.is_scalar(),
                      names=si.get_names())
     self._t = value
     self._data = None
     self._mod_arg = None
Beispiel #9
0
 def get_inputs(self) -> typing.List[ShaderInputParameter]:
     return [
         ShaderInputParameter("Mortar Scale", "mortar_scale",
                              DataType.Float, (0.0, 1.0), 0.85),
         ShaderInputParameter("Brick Scale", "brick_scale", DataType.Float,
                              (0.0, 100.0), 10.0),
         ShaderInputParameter("Brick Elongate", "brick_elongate",
                              DataType.Float, (0.0, 100.0), 2.0),
         ShaderInputParameter("Brick Shift", "brick_shift", DataType.Float,
                              (0., 1.), 0.5),
         ShaderInputParameter("Brick Color", "color_brick",
                              DataType.Vec3_RGB, (0, 1),
                              torch.tensor((0.69, 0.25, 0.255))),
         ShaderInputParameter("Mortar Color", "color_mortar",
                              DataType.Vec3_RGB, (0, 1),
                              torch.tensor((0.9, 0.9, 0.9)))
     ]
Beispiel #10
0
 def get_inputs(self) -> typing.List[ShaderInputParameter]:
     return [
         ShaderInputParameter("Color", "color", DataType.Vec3_RGB, (0, 1),
                              torch.tensor((1., 1., 1.)))
     ]
Beispiel #11
0
 def get_inputs(self) -> typing.List[ShaderInputParameter]:
     return [
         ShaderInputParameter("Brick Color 1",
                              "brick_color1",
                              dtype=DataType.Vec3_RGB,
                              limits=(0, 1),
                              default=torch.tensor((0.6, 0.1, 0.1))),
         ShaderInputParameter("Brick Color 2",
                              "brick_color2",
                              dtype=DataType.Vec3_RGB,
                              limits=(0, 1),
                              default=torch.tensor((0.6, 0.5, 0.5))),
         ShaderInputParameter("Mortar Color",
                              "mortar_color",
                              dtype=DataType.Vec3_RGB,
                              limits=(0, 1),
                              default=torch.tensor((0.5, 0.5, 0.5))),
         ShaderInputParameter("Scale",
                              "scale",
                              dtype=DataType.Float,
                              limits=(0, 100),
                              default=2),
         ShaderInputParameter("Mortar Size",
                              "mortar_size",
                              dtype=DataType.Float,
                              limits=(0, 0.125),
                              default=0.02),
         ShaderInputParameter("Mortar Smooth",
                              "mortar_smooth",
                              dtype=DataType.Float,
                              limits=(0, 1),
                              default=0.1),
         ShaderInputParameter("Color Bias",
                              "bias",
                              dtype=DataType.Float,
                              limits=(-1, 1),
                              default=0.0),
         ShaderInputParameter("Brick Width",
                              "brick_width",
                              dtype=DataType.Float,
                              limits=(0.01, 100),
                              default=0.5),
         ShaderInputParameter("Row Height",
                              "row_height",
                              dtype=DataType.Float,
                              limits=(0.01, 100),
                              default=0.25),
         ShaderInputParameter("Horizontal Shift",
                              "offset_amount",
                              dtype=DataType.Float,
                              limits=(0, 1),
                              default=0.5),
         ShaderInputParameter("Shift Frequency",
                              "offset_frequency",
                              dtype=DataType.Int,
                              limits=(1, 99),
                              default=2),
         ShaderInputParameter("Brick Elongate",
                              "squash_amount",
                              dtype=DataType.Float,
                              limits=(0, 100),
                              default=1),
         ShaderInputParameter("Elongate Frequency",
                              "squash_frequency",
                              dtype=DataType.Int,
                              limits=(1, 99),
                              default=2)
     ]
Beispiel #12
0
 def get_inputs(self) -> typing.List[ShaderInputParameter]:
     return [
         ShaderInputParameter("Scale", "scale", dtype=DataType.Float, limits=(0, 1000), default=10),
     ]
Beispiel #13
0
 def get_inputs(self) -> typing.List[ShaderInputParameter]:
     return [
         ShaderInputParameter("Shader", "shader", DataType.Shader, (0, 1),
                              torch.tensor((1.0, 1.0, 1.0)))
     ]
Beispiel #14
0
 def get_inputs(self) -> typing.List[ShaderInputParameter]:
     return [
         ShaderInputParameter("Color1", "color1", DataType.Vec3_RGB, (0, 1), torch.ones(3)),
         ShaderInputParameter("Color2", "color2", DataType.Vec3_RGB, (0, 1), torch.zeros(3)),
         ShaderInputParameter("Scale", "scale", DataType.Float, (0, 100), 10.0)
     ]