forked from patriciogonzalezvivo/comfyui_glslnodes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.py
More file actions
99 lines (76 loc) · 2.14 KB
/
types.py
File metadata and controls
99 lines (76 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class GlslInt:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"value": ("INT", { "default": 0.0 }),
}
}
CATEGORY = "GLSL"
FUNCTION = "main"
RETURN_TYPES = ("INT", )
RETURN_NAMES = ("int", )
def main(self, value):
return (value, )
class GlslFloat:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"value": ("FLOAT", { "default": 0.0, "step": 0.01 }),
}
}
CATEGORY = "GLSL"
FUNCTION = "main"
RETURN_TYPES = ("FLOAT", )
RETURN_NAMES = ("float", )
def main(self, value):
return (value, )
class GlslVec2:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"x": ("FLOAT", { "default": 0.0, "step": 0.01 }),
"y": ("FLOAT", { "default": 0.0, "step": 0.01 }),
}
}
CATEGORY = "GLSL"
FUNCTION = "main"
RETURN_TYPES = ("VEC2", )
RETURN_NAMES = ("vec2", )
def main(self, x, y):
return ((x, y), )
class GlslVec3:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"x": ("FLOAT", { "default": 0.0, "step": 0.01 }),
"y": ("FLOAT", { "default": 0.0, "step": 0.01 }),
"z": ("FLOAT", { "default": 0.0, "step": 0.01 }),
}
}
CATEGORY = "GLSL"
FUNCTION = "main"
RETURN_TYPES = ("VEC3", )
RETURN_NAMES = ("vec3", )
def main(self, x, y, z):
return ((x, y, z), )
class GlslVec4:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"x": ("FLOAT", { "default": 0.0, "step": 0.01 }),
"y": ("FLOAT", { "default": 0.0, "step": 0.01 }),
"z": ("FLOAT", { "default": 0.0, "step": 0.01 }),
"w": ("FLOAT", { "default": 0.0, "step": 0.01 }),
}
}
CATEGORY = "GLSL"
FUNCTION = "main"
RETURN_TYPES = ("VEC4", )
RETURN_NAMES = ("vec3", )
def main(self, x, y, z, w):
return ((x, y, z,w), )