File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,15 @@ mask c0 c1 = let
199
199
b = vec3 a a a * c0.rgb
200
200
in vec4 b.r b.g b.b a
201
201
202
+ add : Vec4 -> Vec4 -> Float -> Vec4
203
+ add c0 c1 amount = (c0 + c1) * cast4 amount + c0 * cast4 (1.0 - amount)
204
+
205
+ blend : Vec4 -> Vec4 -> Float -> Vec4
206
+ blend c0 c1 amount = c0 * cast4 (1.0 - amount) + c1 * cast4 amount
207
+
208
+ mult : Vec4 -> Vec4 -> Float -> Vec4
209
+ mult c0 c1 amount = c0 * cast4 (1.0 - amount) + c1 * cast4 amount
210
+
202
211
diff : Vec4 -> Vec4 -> Vec4
203
212
diff c0 c1 = let
204
213
difference = c0.rgb - c1.rgb
@@ -226,7 +235,7 @@ osc st time freq sync offset = let
226
235
227
236
modulate : Vec2 -> Vec4 -> Float -> Vec2
228
237
modulate st color amount = let
229
- a = color.xy * vec2 amount amount
238
+ a = color.xy * cast2 amount
230
239
in st + a
231
240
232
241
# TODO why did the type checker choke so bad on this
You can’t perform that action at this time.
0 commit comments