-
Notifications
You must be signed in to change notification settings - Fork 20
/
ACES_expression_nodes.nk
5045 lines (5045 loc) · 118 KB
/
ACES_expression_nodes.nk
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name segmented_spline_c5_fwd
selected true
xpos 70
ypos -226
addUserKnob {20 SegmentedSplineParams_c5_tab l SegmentedSplineParams_c5}
addUserKnob {78 coefsLow n 6}
coefsLow {-4 -4 -3.157376577 -0.4852499958 1.847732471 1.847732471}
addUserKnob {78 coefsHigh n 6}
coefsHigh {-0.7185482425 2.081030717 3.668124124 4 4 4}
addUserKnob {12 minPoint}
minPoint {{0.18*pow(2,-15)} 0.0001}
addUserKnob {12 midPoint}
midPoint {0.18 4.8}
addUserKnob {12 maxPoint}
maxPoint {{0.18*pow(2,18)} 10000}
addUserKnob {7 slopeLow}
addUserKnob {7 slopeHigh}
addUserKnob {3 N_KNOTS_LOW}
N_KNOTS_LOW 4
addUserKnob {3 N_KNOTS_HIGH}
N_KNOTS_HIGH 4
}
Input {
inputs 0
name Input
xpos -1030
ypos -634
}
Dot {
name Dot25
label " "
xpos -996
ypos -318
}
set Nefb74cf0 [stack 0]
Dot {
name Dot26
label " "
xpos -996
ypos 1506
}
push $Nefb74cf0
Dot {
name Dot4
label " "
xpos -886
ypos -318
}
set N22d4c050 [stack 0]
Dot {
name Dot5
label " "
xpos -776
ypos -318
}
set N12217a00 [stack 0]
Dot {
name Dot2
label " "
xpos -666
ypos -318
}
set N1ca0ed20 [stack 0]
Dot {
name Dot3
label " "
xpos -556
ypos -318
}
set N2d7dfe60 [stack 0]
Expression {
temp_name0 logr
temp_expr0 "log10( max(r, 5.96046448e-08 ))"
temp_name1 logg
temp_expr1 "log10( max(g, 5.96046448e-08 ))"
temp_name2 logb
temp_expr2 "log10( max(b, 5.96046448e-08 ))"
expr0 "logr <= log10(minPoint.x)"
expr1 "logg <= log10(minPoint.x)"
expr2 "logb <= log10(minPoint.x)"
name segment_bottom
xpos -590
ypos -178
}
Dot {
name Dot1
label " "
xpos -556
ypos 162
}
push $N2d7dfe60
Dot {
name Dot7
label " "
xpos -336
ypos -318
}
set N99cf8160 [stack 0]
Expression {
temp_name0 logr
temp_expr0 "log10( max(r, 5.96046448e-08 ))"
temp_name1 logg
temp_expr1 "log10( max(g, 5.96046448e-08 ))"
temp_name2 logb
temp_expr2 "log10( max(b, 5.96046448e-08 ))"
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 "logr * slopeLow + ( log10(minPoint.y) - slopeLow * log10(minPoint.x) )"
expr1 "logg * slopeLow + ( log10(minPoint.y) - slopeLow * log10(minPoint.x) )"
expr2 "logb* slopeLow + ( log10(minPoint.y) - slopeLow * log10(minPoint.x) )"
expr3 1
name Expression
xpos -370
ypos -202
}
Merge2 {
inputs 2
operation multiply
also_merge all
name Multiply3
xpos -370
ypos 158
}
Dot {
name Dot27
label " "
xpos -336
ypos 786
}
push $N1ca0ed20
Expression {
temp_name0 logr
temp_expr0 "log10( max(r, 5.96046448e-08 ))"
temp_name1 logg
temp_expr1 "log10( max(g, 5.96046448e-08 ))"
temp_name2 logb
temp_expr2 "log10( max(b, 5.96046448e-08 ))"
expr0 "( logr > log10(minPoint.x) ) * ( logr < log10(midPoint.x) )"
expr1 "( logg > log10(minPoint.x) ) * ( logg < log10(midPoint.x) )"
expr2 "( logb > log10(minPoint.x) ) * ( logb < log10(midPoint.x) )"
name segment_low
xpos -700
ypos -178
}
Dot {
name Dot22
label " "
xpos -666
ypos 354
}
push $N99cf8160
Dot {
name Dot9
label " "
xpos -6
ypos -318
}
set Nd1e78c90 [stack 0]
Dot {
name Dot6
label " "
xpos -6
ypos -198
}
set N76086b60 [stack 0]
Dot {
name Dot8
label " "
xpos 214
ypos -198
}
set N6608ae80 [stack 0]
Dot {
name Dot13
label " "
xpos 434
ypos -198
}
Dot {
name Dot12
label " "
xpos 434
ypos -78
}
set Nb48a13a0 [stack 0]
Expression {
temp_name0 logx
temp_expr0 "(log10( max(b, 5.96046448e-08 )))"
temp_name1 knot_coord
temp_expr1 "(N_KNOTS_LOW-1) * (logx-log10(minPoint.x))/(log10(midPoint.x)-log10(minPoint.x))"
temp_name2 j
temp_expr2 int(knot_coord)
temp_name3 t
temp_expr3 "knot_coord - j"
expr0 "j == 0 ? coefsLow.0 : j == 1 ? coefsLow.1 : j == 2 ? coefsLow.2 :j == 3 ? coefsLow.3 : j == 4 ? coefsLow.4 : j == 5 ? coefsLow.5 : 6"
expr1 "j == 0 ? coefsLow.1 : j == 1 ? coefsLow.2 : j == 2 ? coefsLow.3 :j == 3 ? coefsLow.4 : j == 4 ? coefsLow.5 : j == 5 ? coefsLow.5 : 6"
expr2 "j == 0 ? coefsLow.2 : j == 1 ? coefsLow.3 : j == 2 ? coefsLow.4 :j == 3 ? coefsLow.5 : j == 4 ? coefsLow.5 : j == 5 ? coefsLow.5 : 6"
name Expression5
xpos 290
ypos -34
}
ColorMatrix {
matrix {
{0.5 -1 0.5}
{-1 1 0}
{0.5 0.5 0}
}
name ColorMatrix3
label "mult_f3_f33( cf, M)"
xpos 290
ypos 8
}
push $Nb48a13a0
Expression {
temp_name0 logx
temp_expr0 "(log10( max(b, 5.96046448e-08 )))"
temp_name1 knot_coord
temp_expr1 "(N_KNOTS_LOW-1) * (logx-log10(minPoint.x))/(log10(midPoint.x)-log10(minPoint.x))"
temp_name2 j
temp_expr2 int(knot_coord)
temp_name3 t
temp_expr3 "knot_coord - j"
expr0 t*t
expr1 t
expr2 1
expr3 1
name Expression6
xpos 400
ypos -34
}
MergeExpression {
inputs 2
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 0
expr1 0
expr2 (Ar*Br)+(Ag*Bg)+(Ab*Bb)
name dot_f3_f2
label "logy = dot_f3_f3( monomials, mult_f3_f33( cf, M))"
xpos 400
ypos 8
}
push 0
push $N6608ae80
Dot {
name Dot11
label " "
xpos 214
ypos -78
}
set N656dabb0 [stack 0]
Expression {
temp_name0 logx
temp_expr0 "(log10( max(g, 5.96046448e-08 )))"
temp_name1 knot_coord
temp_expr1 "(N_KNOTS_LOW-1) * (logx-log10(minPoint.x))/(log10(midPoint.x)-log10(minPoint.x))"
temp_name2 j
temp_expr2 int(knot_coord)
temp_name3 t
temp_expr3 "knot_coord - j"
expr0 "j == 0 ? coefsLow.0 : j == 1 ? coefsLow.1 : j == 2 ? coefsLow.2 :j == 3 ? coefsLow.3 : j == 4 ? coefsLow.4 : j == 5 ? coefsLow.5 : 6"
expr1 "j == 0 ? coefsLow.1 : j == 1 ? coefsLow.2 : j == 2 ? coefsLow.3 :j == 3 ? coefsLow.4 : j == 4 ? coefsLow.5 : j == 5 ? coefsLow.5 : 6"
expr2 "j == 0 ? coefsLow.2 : j == 1 ? coefsLow.3 : j == 2 ? coefsLow.4 :j == 3 ? coefsLow.5 : j == 4 ? coefsLow.5 : j == 5 ? coefsLow.5 : 6"
name Expression3
xpos 70
ypos -34
}
ColorMatrix {
matrix {
{0.5 -1 0.5}
{-1 1 0}
{0.5 0.5 0}
}
name ColorMatrix1
label "mult_f3_f33( cf, M)"
xpos 70
ypos 8
}
push $N656dabb0
Expression {
temp_name0 logx
temp_expr0 "(log10( max(g, 5.96046448e-08 )))"
temp_name1 knot_coord
temp_expr1 "(N_KNOTS_LOW-1) * (logx-log10(minPoint.x))/(log10(midPoint.x)-log10(minPoint.x))"
temp_name2 j
temp_expr2 int(knot_coord)
temp_name3 t
temp_expr3 "knot_coord - j"
expr0 t*t
expr1 t
expr2 1
expr3 1
name Expression4
xpos 180
ypos -34
}
MergeExpression {
inputs 2
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 0
expr1 (Ar*Br)+(Ag*Bg)+(Ab*Bb)
expr2 0
name dot_f3_f7
label "logy = dot_f3_f3( monomials, mult_f3_f33( cf, M))"
xpos 180
ypos 8
}
push $N76086b60
Dot {
name Dot10
label " "
xpos -6
ypos -78
}
set N73ebfdb0 [stack 0]
Expression {
temp_name0 logx
temp_expr0 "(log10( max(r, 5.96046448e-08 )))"
temp_name1 knot_coord
temp_expr1 "(N_KNOTS_LOW-1) * (logx-log10(minPoint.x))/(log10(midPoint.x)-log10(minPoint.x))"
temp_name2 j
temp_expr2 int(knot_coord)
temp_name3 t
temp_expr3 "knot_coord - j"
expr0 "j == 0 ? coefsLow.0 : j == 1 ? coefsLow.1 : j == 2 ? coefsLow.2 :j == 3 ? coefsLow.3 : j == 4 ? coefsLow.4 : j == 5 ? coefsLow.5 : 6"
expr1 "j == 0 ? coefsLow.1 : j == 1 ? coefsLow.2 : j == 2 ? coefsLow.3 :j == 3 ? coefsLow.4 : j == 4 ? coefsLow.5 : j == 5 ? coefsLow.5 : 6"
expr2 "j == 0 ? coefsLow.2 : j == 1 ? coefsLow.3 : j == 2 ? coefsLow.4 :j == 3 ? coefsLow.5 : j == 4 ? coefsLow.5 : j == 5 ? coefsLow.5 : 6"
name Expression1
xpos -150
ypos -34
}
ColorMatrix {
matrix {
{0.5 -1 0.5}
{-1 1 0}
{0.5 0.5 0}
}
name ColorMatrix2
label "mult_f3_f33( cf, M)"
xpos -150
ypos 8
}
push $N73ebfdb0
Expression {
temp_name0 logx
temp_expr0 "(log10( max(r, 5.96046448e-08 )))"
temp_name1 knot_coord
temp_expr1 "(N_KNOTS_LOW-1) * (logx-log10(minPoint.x))/(log10(midPoint.x)-log10(minPoint.x))"
temp_name2 j
temp_expr2 int(knot_coord)
temp_name3 t
temp_expr3 "knot_coord - j"
expr0 t*t
expr1 t
expr2 1
expr3 1
name Expression2
xpos -40
ypos -34
}
MergeExpression {
inputs 2
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 (Ar*Br)+(Ag*Bg)+(Ab*Bb)
expr1 0
expr2 0
name dot_f3_f1
label "logy = dot_f3_f3( monomials, mult_f3_f33( cf, M))"
xpos -40
ypos 66
}
Merge2 {
inputs 3+1
operation plus
bbox B
output rgb
name Merge1
xpos 180
ypos 158
}
Merge2 {
inputs 2
operation multiply
also_merge all
name Multiply1
xpos 180
ypos 350
}
Dot {
name Dot28
label " "
xpos 214
ypos 786
}
push 0
push $N12217a00
Expression {
temp_name0 logr
temp_expr0 "log10( max(r, 5.96046448e-08 ))"
temp_name1 logg
temp_expr1 "log10( max(g, 5.96046448e-08 ))"
temp_name2 logb
temp_expr2 "log10( max(b, 5.96046448e-08 ))"
expr0 "( logr >= log10(midPoint.x) ) * ( logr < log10(maxPoint.x) )"
expr1 "( logg >= log10(midPoint.x) ) * ( logg < log10(maxPoint.x) )"
expr2 "( logb >= log10(midPoint.x) ) * ( logb < log10(maxPoint.x) )"
name segment_high
xpos -810
ypos -178
}
Dot {
name Dot23
label " "
xpos -776
ypos 474
}
push $Nd1e78c90
Dot {
name Dot14
label " "
xpos 764
ypos -318
}
set N7d80a40 [stack 0]
Dot {
name Dot15
label " "
xpos 764
ypos -198
}
set N15555050 [stack 0]
Dot {
name Dot17
label " "
xpos 984
ypos -198
}
set N5c1f3d10 [stack 0]
Dot {
name Dot20
label " "
xpos 1204
ypos -198
}
Dot {
name Dot19
label " "
xpos 1204
ypos -78
}
set N3e16ec10 [stack 0]
Expression {
temp_name0 logx
temp_expr0 "(log10( max(b, 5.96046448e-08 )))"
temp_name1 knot_coord
temp_expr1 "(N_KNOTS_HIGH-1) * (logx-log10(midPoint.x))/(log10(maxPoint.x)-log10(midPoint.x))"
temp_name2 j
temp_expr2 int(knot_coord)
temp_name3 t
temp_expr3 "knot_coord - j"
expr0 "j == 0 ? coefsHigh.0 : j == 1 ? coefsHigh.1 : j == 2 ? coefsHigh.2 :j == 3 ? coefsHigh.3 : j == 4 ? coefsHigh.4 : j == 5 ? coefsHigh.5 : 6"
expr1 "j == 0 ? coefsHigh.1 : j == 1 ? coefsHigh.2 : j == 2 ? coefsHigh.3 :j == 3 ? coefsHigh.4 : j == 4 ? coefsHigh.5 : j == 5 ? coefsHigh.5 : 6"
expr2 "j == 0 ? coefsHigh.2 : j == 1 ? coefsHigh.3 : j == 2 ? coefsHigh.4 :j == 3 ? coefsHigh.5 : j == 4 ? coefsHigh.5 : j == 5 ? coefsHigh.5 : 6"
expr3 j
name Expression11
xpos 1060
ypos -34
}
ColorMatrix {
matrix {
{0.5 -1 0.5}
{-1 1 0}
{0.5 0.5 0}
}
name ColorMatrix6
label "mult_f3_f33( cf, M)"
xpos 1060
ypos 8
}
push $N3e16ec10
Expression {
temp_name0 logx
temp_expr0 "(log10( max(b, 5.96046448e-08 )))"
temp_name1 knot_coord
temp_expr1 "(N_KNOTS_HIGH-1) * (logx-log10(midPoint.x))/(log10(maxPoint.x)-log10(midPoint.x))"
temp_name2 j
temp_expr2 int(knot_coord)
temp_name3 t
temp_expr3 "knot_coord - j"
expr0 t*t
expr1 t
expr2 1
expr3 1
name Expression12
xpos 1170
ypos -34
}
MergeExpression {
inputs 2
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 0
expr1 0
expr2 (Ar*Br)+(Ag*Bg)+(Ab*Bb)
name dot_f3_f6
label "logy = dot_f3_f3( monomials, mult_f3_f33( cf, M))"
xpos 1170
ypos 8
}
push 0
push $N5c1f3d10
Dot {
name Dot18
label " "
xpos 984
ypos -78
}
set Na5abd10 [stack 0]
Expression {
temp_name0 logx
temp_expr0 "(log10( max(g, 5.96046448e-08 )))"
temp_name1 knot_coord
temp_expr1 "(N_KNOTS_HIGH-1) * (logx-log10(midPoint.x))/(log10(maxPoint.x)-log10(midPoint.x))"
temp_name2 j
temp_expr2 int(knot_coord)
temp_name3 t
temp_expr3 "knot_coord - j"
expr0 "j == 0 ? coefsHigh.0 : j == 1 ? coefsHigh.1 : j == 2 ? coefsHigh.2 :j == 3 ? coefsHigh.3 : j == 4 ? coefsHigh.4 : j == 5 ? coefsHigh.5 : 6"
expr1 "j == 0 ? coefsHigh.1 : j == 1 ? coefsHigh.2 : j == 2 ? coefsHigh.3 :j == 3 ? coefsHigh.4 : j == 4 ? coefsHigh.5 : j == 5 ? coefsHigh.5 : 6"
expr2 "j == 0 ? coefsHigh.2 : j == 1 ? coefsHigh.3 : j == 2 ? coefsHigh.4 :j == 3 ? coefsHigh.5 : j == 4 ? coefsHigh.5 : j == 5 ? coefsHigh.5 : 6"
expr3 j
name Expression9
xpos 840
ypos -34
}
ColorMatrix {
matrix {
{0.5 -1 0.5}
{-1 1 0}
{0.5 0.5 0}
}
name ColorMatrix5
label "mult_f3_f33( cf, M)"
xpos 840
ypos 8
}
push $Na5abd10
Expression {
temp_name0 logx
temp_expr0 "(log10( max(g, 5.96046448e-08 )))"
temp_name1 knot_coord
temp_expr1 "(N_KNOTS_HIGH-1) * (logx-log10(midPoint.x))/(log10(maxPoint.x)-log10(midPoint.x))"
temp_name2 j
temp_expr2 int(knot_coord)
temp_name3 t
temp_expr3 "knot_coord - j"
expr0 t*t
expr1 t
expr2 1
expr3 1
name Expression10
xpos 950
ypos -34
}
MergeExpression {
inputs 2
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 0
expr1 (Ar*Br)+(Ag*Bg)+(Ab*Bb)
expr2 0
name dot_f3_f5
label "logy = dot_f3_f3( monomials, mult_f3_f33( cf, M))"
xpos 950
ypos 8
}
push $N15555050
Dot {
name Dot16
label " "
xpos 764
ypos -78
}
set N45bf53d0 [stack 0]
Expression {
temp_name0 logx
temp_expr0 "(log10( max(r, 5.96046448e-08 )))"
temp_name1 knot_coord
temp_expr1 "(N_KNOTS_HIGH-1) * (logx-log10(midPoint.x))/(log10(maxPoint.x)-log10(midPoint.x))"
temp_name2 j
temp_expr2 int(knot_coord)
temp_name3 t
temp_expr3 "knot_coord - j"
expr0 "j == 0 ? coefsHigh.0 : j == 1 ? coefsHigh.1 : j == 2 ? coefsHigh.2 :j == 3 ? coefsHigh.3 : j == 4 ? coefsHigh.4 : j == 5 ? coefsHigh.5 : 6"
expr1 "j == 0 ? coefsHigh.1 : j == 1 ? coefsHigh.2 : j == 2 ? coefsHigh.3 :j == 3 ? coefsHigh.4 : j == 4 ? coefsHigh.5 : j == 5 ? coefsHigh.5 : 6"
expr2 "j == 0 ? coefsHigh.2 : j == 1 ? coefsHigh.3 : j == 2 ? coefsHigh.4 :j == 3 ? coefsHigh.5 : j == 4 ? coefsHigh.5 : j == 5 ? coefsHigh.5 : 6"
expr3 j
name Expression7
xpos 620
ypos -34
}
ColorMatrix {
matrix {
{0.5 -1 0.5}
{-1 1 0}
{0.5 0.5 0}
}
name ColorMatrix4
label "mult_f3_f33( cf, M)"
xpos 620
ypos 8
}
push $N45bf53d0
Expression {
temp_name0 logx
temp_expr0 "(log10( max(r, 5.96046448e-08 )))"
temp_name1 knot_coord
temp_expr1 "(N_KNOTS_HIGH-1) * (logx-log10(midPoint.x))/(log10(maxPoint.x)-log10(midPoint.x))"
temp_name2 j
temp_expr2 int(knot_coord)
temp_name3 t
temp_expr3 "knot_coord - j"
expr0 t*t
expr1 t
expr2 1
expr3 1
name Expression8
xpos 730
ypos -34
}
MergeExpression {
inputs 2
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 (Ar*Br)+(Ag*Bg)+(Ab*Bb)
expr1 0
expr2 0
name dot_f3_f4
label "logy = dot_f3_f3( monomials, mult_f3_f33( cf, M))"
xpos 730
ypos 8
}
Merge2 {
inputs 3+1
operation plus
bbox B
output rgb
name Merge2
xpos 950
ypos 158
}
Merge2 {
inputs 2
operation multiply
also_merge all
name Multiply2
xpos 950
ypos 470
}
Dot {
name Dot29
label " "
xpos 984
ypos 786
}
push $N22d4c050
Expression {
temp_name0 logr
temp_expr0 "log10( max(r, 5.96046448e-08 ))"
temp_name1 logg
temp_expr1 "log10( max(g, 5.96046448e-08 ))"
temp_name2 logb
temp_expr2 "log10( max(b, 5.96046448e-08 ))"
expr0 "logr >= log10(maxPoint.x) ? 1 : 0"
expr1 "logg >= log10(maxPoint.x) ? 1 : 0"
expr2 "logb >= log10(maxPoint.x) ? 1 : 0"
name segment_peak
xpos -920
ypos -178
}
Dot {
name Dot24
label " "
xpos -886
ypos 618
}
push $N7d80a40
Dot {
name Dot21
label " "
xpos 1534
ypos -318
}
Expression {
temp_name0 logr
temp_expr0 "log10( max(r, 5.96046448e-08 ))"
temp_name1 logg
temp_expr1 "log10( max(g, 5.96046448e-08 ))"
temp_name2 logb
temp_expr2 "log10( max(b, 5.96046448e-08 ))"
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 "logr * slopeHigh + ( log10(maxPoint.y) - slopeHigh * log10(maxPoint.x) )"
expr1 "logg * slopeHigh + ( log10(maxPoint.y) - slopeHigh * log10(maxPoint.x) )"
expr2 "logb* slopeHigh + ( log10(maxPoint.y) - slopeHigh * log10(maxPoint.x) )"
expr3 1
name proc_low1
label Expression
xpos 1500
ypos -202
}
Merge2 {
inputs 2
operation multiply
also_merge all
name Multiply4
xpos 1500
ypos 614
}
Merge2 {
inputs 4+1
operation plus
bbox B
output rgb
name Merge3
xpos 510
ypos 1118
}
Expression {
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 pow(10,r)
expr1 pow(10,g)
expr2 pow(10,b)
name Expression13
xpos 510
ypos 1238
}
Copy {
inputs 2
from0 rgba.alpha
to0 rgba.alpha
name Copy1
xpos 510
ypos 1496
}
Output {
name Output1
xpos 510
ypos 1814
}
end_group
push $cut_paste_input
Group {
name red_modifier
note_font Helvetica
selected true
xpos 400
ypos -177
addUserKnob {20 Params_tab l Params}
addUserKnob {7 RRT_RED_SCALE}
RRT_RED_SCALE 0.82
addUserKnob {7 RRT_RED_PIVOT}
RRT_RED_PIVOT 0.03
addUserKnob {7 RRT_RED_HUE}
addUserKnob {7 RRT_RED_WIDTH R 0 360}
RRT_RED_WIDTH 135
addUserKnob {6 invert +STARTLINE}
}
Input {
inputs 0
name Input
xpos -40
ypos -10
}
Dot {
name Dot1
xpos -6
ypos 42
}
set N89efede0 [stack 0]
Dot {
name Dot2
xpos -226
ypos 42
}
set N17857240 [stack 0]
Expression {
temp_name0 TINY
temp_expr0 1e-10
temp_name1 min_f3
temp_expr1 min(r,min(g,b))
temp_name2 max_f3
temp_expr2 max(r,max(g,b))
channel0 rgb
expr0 "(max( max_f3, TINY) - max( min_f3, TINY)) / max( max_f3, 1e-2)"
channel1 none
expr1 0
channel2 none
expr2 0
name rgb_2_saturation
xpos -260
ypos 86
}
push $N17857240
Dot {
name Dot3
xpos -336
ypos 42
}
Expression {
temp_name0 hue
temp_expr0 "(r==g&&g==b)?0:(180/pi) * atan2( sqrt(3)*(g-b), 2*r-g-b)"
channel0 {rgba.red -rgba.green -rgba.blue -rgba.alpha}
expr0 "hue < 0 ? hue + 360 : hue"
channel1 {-rgba.red rgba.green -rgba.blue none}
expr1 0
expr2 0
name rgb_2_hue
xpos -370
ypos 86
}
Expression {
temp_name0 hue
temp_expr0 r
temp_name1 centerH
temp_expr1 RRT_RED_HUE
temp_name2 hueCentered
temp_expr2 hue-centerH
channel0 {-rgba.red rgba.green -rgba.blue -rgba.alpha}
expr0 "hueCentered < -180.0 ? hueCentered + 360.0 : (hueCentered > 180.0) ? hueCentered - 360.0 : hueCentered"
name center_hue
xpos -370
ypos 134
}
Expression {
temp_name0 centeredHue
temp_expr0 g
temp_name1 knot_coord
temp_expr1 "(centeredHue - knots.0) * 4.0/w"
temp_name2 j
temp_expr2 int(knot_coord)
temp_name3 t
temp_expr3 "knot_coord - j"
channel0 {rgba.red -rgba.green -rgba.blue -rgba.alpha}
expr0 "(min((centeredHue > knots.0?1:0) , (centeredHue < knots.4?1:0)) ? j == 3 ? t*t*t * -1./6 + t*t * 3./6 + t * -3./6 + 1 * 1./6 : j == 2 ? t*t*t * 3./6 + t*t * -6./6 + t * 0./6 + 1. *4./6 : j == 1 ? t*t*t * -3./6 + t*t * 3./6 + t * 3./6 + 1. * 1./6 : j == 0 ? t*t*t * 1./6 + t*t * 0./6 + t * 0./6 + 1. * 0./6 : 0 : 0) * 3/2"
channel1 none
channel2 none
name cubic_basis_shaper
xpos -370
ypos 182
addUserKnob {20 param}
addUserKnob {7 w R 0 360}
w {{parent.RRT_RED_WIDTH}}
addUserKnob {78 knots n 5}
knots {{-w/2} {-w/4} 0 {w/4} {w/2}}
}
Dot {
name Dot4
xpos -336
ypos 234
}
Copy {
inputs 2
from0 rgba.blue
to0 rgba.blue
name Copy4
note_font Helvetica
xpos -260
ypos 226
}
Dot {
name Dot6
label " r : hueWeight\n g : centeredHue\n b : saturation"
note_font "Helvetica \[pyrs]"
note_font_size 12
note_font_color 0xff
xpos -226
ypos 282
}
Dot {
name Dot7
xpos -226
ypos 330
}
set N514aa6b0 [stack 0]
push $N89efede0
Dot {
name Dot8
xpos -6
ypos 258
}
set N358e73e0 [stack 0]
MergeExpression {
inputs 2
temp_name0 minChan
temp_expr0 "Ag < 0 ? Bg : Bb"
temp_name1 a_
temp_expr1 "Ar * (1. - RRT_RED_SCALE) - 1."
temp_name2 b
temp_expr2 "Br - Ar* (RRT_RED_PIVOT + minChan) * (1. - RRT_RED_SCALE)"
temp_name3 c
temp_expr3 "Ar * RRT_RED_PIVOT * minChan * (1. - RRT_RED_SCALE)"
expr0 "( -b - sqrt( b * b - 4. * a_ * c)) / ( 2. * a_)"
name red_modifier_rev
note_font Helvetica
xpos -150
ypos 351
}
push $N514aa6b0
push $N358e73e0
MergeExpression {
inputs 2
expr0 "r + Ar * Ab * (RRT_RED_PIVOT - r) * (1. - RRT_RED_SCALE)"
name red_modifier_fwd
note_font Helvetica
xpos -40
ypos 327
}
Switch {
inputs 2
which {{parent.invert}}
name Switch_direction
note_font Helvetica
xpos -40
ypos 423
}
Output {
name Output
xpos -40
ypos 494
}
end_group
push $cut_paste_input
Group {
name glow_module
note_font Helvetica
selected true
xpos 400
ypos -225
addUserKnob {20 Params_tab l Params}
addUserKnob {7 RRT_GLOW_GAIN}
RRT_GLOW_GAIN 0.05
addUserKnob {7 RRT_GLOW_MID}
RRT_GLOW_MID 0.08
addUserKnob {6 invert +STARTLINE}
}
Input {
inputs 0
name Input
xpos -40
ypos -562
}
Dot {
name Dot2
xpos -6
ypos -510
}
set N25243b50 [stack 0]
Dot {
name Dot4
xpos -116
ypos -510
}
set N2b5ece80 [stack 0]
Expression {
temp_name0 chroma
temp_expr0 sqrt(b*(b-g)+g*(g-r)+r*(r-b))
temp_name1 ycRadiusWeight
temp_expr1 1.75
channel0 {-rgba.red rgba.green -rgba.blue none}
expr0 "( b + g + r + ycRadiusWeight * chroma) / 3.0"
channel1 {rgba.red -rgba.green -rgba.blue none}
expr1 0
expr2 0
name rgb_2_yc1
xpos -150
ypos -466
}
push 0
push $N2b5ece80
Dot {
name Dot3
xpos -226
ypos -510
}
Expression {
temp_name0 TINY
temp_expr0 1e-10
temp_name1 min_f3
temp_expr1 min(r,min(g,b))
temp_name2 max_f3
temp_expr2 max(r,max(g,b))
expr0 "(max( max_f3, TINY) - max( min_f3, TINY)) / max( max_f3, 1e-2)"
expr1 0
expr2 0
name rgb_2_saturation1
xpos -260
ypos -466
}
set N691936d0 [stack 0]
Expression {
channel0 {rgba.red rgba.green rgba.blue none}
expr0 "(r - 0.4) / 0.2"